diff --git a/services/Archival/FilterLists.Archival.Api/Controllers/PingController.cs b/services/Archival/FilterLists.Archival.Api/Controllers/PingController.cs index 10f008b01..0a36a4965 100644 --- a/services/Archival/FilterLists.Archival.Api/Controllers/PingController.cs +++ b/services/Archival/FilterLists.Archival.Api/Controllers/PingController.cs @@ -9,7 +9,7 @@ namespace FilterLists.Archival.Api.Controllers public class PingController : ControllerBase { /// - /// A sample endpoint. + /// A sample endpoint. /// /// Pong. [HttpGet] diff --git a/services/Archival/FilterLists.Archival.Api/FilterLists.Archival.Api.csproj b/services/Archival/FilterLists.Archival.Api/FilterLists.Archival.Api.csproj index a14f914be..8c5bb1286 100644 --- a/services/Archival/FilterLists.Archival.Api/FilterLists.Archival.Api.csproj +++ b/services/Archival/FilterLists.Archival.Api/FilterLists.Archival.Api.csproj @@ -1,42 +1,42 @@  - - Exe - net5.0 - enable - true - true - alpine.3.12-x64;win10-x64 - + + Exe + net5.0 + enable + true + true + alpine.3.12-x64;win10-x64 + - - Collin M. Barrett - FilterLists - FilterLists Archival - The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances. - Copyright (c) 2021 Collin M. Barrett - https://github.com/collinbarrett/FilterLists - https://filterlists.com - Linux - ..\.. - ..\..\..\docker-compose\docker-compose.dcproj - + + Collin M. Barrett + FilterLists + FilterLists Archival + The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances. + Copyright (c) 2021 Collin M. Barrett + https://github.com/collinbarrett/FilterLists + https://filterlists.com + Linux + ..\.. + ..\..\..\docker-compose\docker-compose.dcproj + - - - + + + - - - - + + + + - - - + + + - - - + + + \ No newline at end of file diff --git a/services/Archival/FilterLists.Archival.Api/SwaggerExtensions.cs b/services/Archival/FilterLists.Archival.Api/SwaggerExtensions.cs index 8a0c92fdd..6ec1ca314 100644 --- a/services/Archival/FilterLists.Archival.Api/SwaggerExtensions.cs +++ b/services/Archival/FilterLists.Archival.Api/SwaggerExtensions.cs @@ -17,10 +17,11 @@ public static void AddSwaggerGen(this IServiceCollection services) o.SwaggerDoc("v1", new OpenApiInfo { Title = "FilterLists Archival API", - Description = "An ASP.NET Core API archiving and serving copies of FilterLists for mirrors and analysis.", + Description = + "An ASP.NET Core API archiving and serving copies of FilterLists for mirrors and analysis.", Version = "v1", //TermsOfService = "", - Contact = new OpenApiContact {Name = "FilterLists", Url = new Uri("https://filterlists.com")}, + Contact = new OpenApiContact { Name = "FilterLists", Url = new Uri("https://filterlists.com") }, License = new OpenApiLicense { Name = "MIT License", @@ -42,9 +43,9 @@ public static void UseSwagger(this IApplicationBuilder app) o.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.Servers = new List { #if DEBUG - new OpenApiServer {Url = $"{httpReq.Scheme}://{httpReq.Host.Value}:8080/api/archival"} + new() { Url = $"{httpReq.Scheme}://{httpReq.Host.Value}:8080/api/archival" } #else - new OpenApiServer {Url = $"https://{httpReq.Host.Value}/api/archival"} + new() { Url = $"https://{httpReq.Host.Value}/api/archival" } #endif }); }); diff --git a/services/Archival/FilterLists.Archival.Application/Commands/EnqueueArchiveAllLists.cs b/services/Archival/FilterLists.Archival.Application/Commands/EnqueueArchiveAllLists.cs index 2d341c3a3..161add193 100644 --- a/services/Archival/FilterLists.Archival.Application/Commands/EnqueueArchiveAllLists.cs +++ b/services/Archival/FilterLists.Archival.Application/Commands/EnqueueArchiveAllLists.cs @@ -42,7 +42,8 @@ public async Task Handle(Command request, CancellationToken cancellationTo spacing = TimeSpan.FromSeconds((double)86400 / lists.Count); #endif - _logger.LogInformation("Enqueuing archival of {ArchiveCount} lists spaced {Spacing} seconds apart.", archiveCount, spacing.Seconds); + _logger.LogInformation("Enqueuing archival of {ArchiveCount} lists spaced {Spacing} seconds apart.", + archiveCount, spacing.Seconds); for (var i = 0; i < archiveCount; i++) { diff --git a/services/Archival/FilterLists.Archival.Application/ConfigurationExtensions.cs b/services/Archival/FilterLists.Archival.Application/ConfigurationExtensions.cs index e2fc58e27..8c3216252 100644 --- a/services/Archival/FilterLists.Archival.Application/ConfigurationExtensions.cs +++ b/services/Archival/FilterLists.Archival.Application/ConfigurationExtensions.cs @@ -35,7 +35,7 @@ private static void ScheduleArchival() JobStorage.Current?.GetMonitoringApi()?.PurgeJobs(); new EnqueueArchiveAllLists.Command().EnqueueBackgroundJob(); #else - new EnqueueArchiveAllLists.Command().AddOrUpdateRecurringJob(Hangfire.Cron.Daily); + new EnqueueArchiveAllLists.Command().AddOrUpdateRecurringJob(Cron.Daily); #endif } } diff --git a/services/Archival/FilterLists.Archival.Domain/ListArchives/ListFileExtension.cs b/services/Archival/FilterLists.Archival.Domain/ListArchives/ListFileExtension.cs index bd7660a80..91ab5d8f8 100644 --- a/services/Archival/FilterLists.Archival.Domain/ListArchives/ListFileExtension.cs +++ b/services/Archival/FilterLists.Archival.Domain/ListArchives/ListFileExtension.cs @@ -10,36 +10,36 @@ public sealed class ListFileExtension : ValueObject private static readonly IDictionary Info = new Dictionary { - {string.Empty, (true, false)}, - {".txt", (true, false)}, - {".7z", (false, false)}, - {".action", (true, true)}, // Privoxy - {".all", (true, false)}, - {".aspx", (true, false)}, - {".bat", (true, true)}, - {".blacklist", (true, false)}, - {".cidr", (true, true)}, - {".conf", (true, true)}, // dnsmasq / Unbound / BIND - {".csv", (true, true)}, - {".dat", (true, true)}, // Halite for Windows - {".deny", (true, true)}, - {".gz", (false, false)}, - {".hosts", (true, true)}, - {".ips", (true, false)}, - {".ipset", (true, true)}, // Firehol - {".json", (true, true)}, - {".list", (true, false)}, - {".lsrules", (true, true)}, // Little Snitch - {".md", (true, true)}, - {".netset", (true, true)}, // Firehol - {".p2p", (true, true)}, // Peer Guardian - {".php", (true, false)}, - {".raw", (true, false)}, - {".rpz", (true, true)}, // Response Policy Zone - {".tpl", (true, true)}, // Internet Explorer - {".uBl", (true, false)}, - {".zip", (false, false)}, - {".zone", (true, false)} + { string.Empty, (true, false) }, + { ".txt", (true, false) }, + { ".7z", (false, false) }, + { ".action", (true, true) }, // Privoxy + { ".all", (true, false) }, + { ".aspx", (true, false) }, + { ".bat", (true, true) }, + { ".blacklist", (true, false) }, + { ".cidr", (true, true) }, + { ".conf", (true, true) }, // dnsmasq / Unbound / BIND + { ".csv", (true, true) }, + { ".dat", (true, true) }, // Halite for Windows + { ".deny", (true, true) }, + { ".gz", (false, false) }, + { ".hosts", (true, true) }, + { ".ips", (true, false) }, + { ".ipset", (true, true) }, // Firehol + { ".json", (true, true) }, + { ".list", (true, false) }, + { ".lsrules", (true, true) }, // Little Snitch + { ".md", (true, true) }, + { ".netset", (true, true) }, // Firehol + { ".p2p", (true, true) }, // Peer Guardian + { ".php", (true, false) }, + { ".raw", (true, false) }, + { ".rpz", (true, true) }, // Response Policy Zone + { ".tpl", (true, true) }, // Internet Explorer + { ".uBl", (true, false) }, + { ".zip", (false, false) }, + { ".zone", (true, false) } }; private ListFileExtension(string value) @@ -60,7 +60,7 @@ public static ListFileExtension FromUri(Uri uri) protected override IEnumerable GetEqualityComponents() { - return new[] {Value}; + return new[] { Value }; } } } diff --git a/services/Archival/FilterLists.Archival.Infrastructure/Clients/IHttpContentClient.cs b/services/Archival/FilterLists.Archival.Infrastructure/Clients/IHttpContentClient.cs index a817a3e2f..3ddcc01ff 100644 --- a/services/Archival/FilterLists.Archival.Infrastructure/Clients/IHttpContentClient.cs +++ b/services/Archival/FilterLists.Archival.Infrastructure/Clients/IHttpContentClient.cs @@ -22,7 +22,8 @@ internal sealed class HttpContentClient : IHttpContentClient public HttpContentClient(HttpClient httpClient, ILogger logger) { _httpClient = httpClient; - _httpClient.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"); + _httpClient.DefaultRequestHeaders.Add("User-Agent", + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36"); _logger = logger; } diff --git a/services/Archival/FilterLists.Archival.Infrastructure/Persistence/GitListArchiveRepository.cs b/services/Archival/FilterLists.Archival.Infrastructure/Persistence/GitListArchiveRepository.cs index 247b688b9..59bc4a383 100644 --- a/services/Archival/FilterLists.Archival.Infrastructure/Persistence/GitListArchiveRepository.cs +++ b/services/Archival/FilterLists.Archival.Infrastructure/Persistence/GitListArchiveRepository.cs @@ -75,7 +75,8 @@ public void Commit() { var fileNames = _writtenFiles.Select(f => f.Name).ToList(); var signature = new Signature(_options.UserName, _options.UserEmail, DateTime.UtcNow); - var message = $"feat(archives): archive {fileNames.Count} file(s){Environment.NewLine}{string.Join(Environment.NewLine, fileNames)}"; + var message = + $"feat(archives): archive {fileNames.Count} file(s){Environment.NewLine}{string.Join(Environment.NewLine, fileNames)}"; Commands.Stage(_repo, fileNames); try { diff --git a/services/Archival/FilterLists.Archival.Infrastructure/Scheduling/ConfigurationExtensions.cs b/services/Archival/FilterLists.Archival.Infrastructure/Scheduling/ConfigurationExtensions.cs index 8e34b1225..0b04e57d8 100644 --- a/services/Archival/FilterLists.Archival.Infrastructure/Scheduling/ConfigurationExtensions.cs +++ b/services/Archival/FilterLists.Archival.Infrastructure/Scheduling/ConfigurationExtensions.cs @@ -19,7 +19,7 @@ public static void AddSchedulingServices(this IServiceCollection services, IConf public static void UseScheduling(this IApplicationBuilder app) { - app.UseHangfireServer(new BackgroundJobServerOptions {WorkerCount = Environment.ProcessorCount}); + app.UseHangfireServer(new BackgroundJobServerOptions { WorkerCount = Environment.ProcessorCount }); } } } diff --git a/services/Archival/FilterLists.Archival.Infrastructure/Scheduling/ScheduleMediator.cs b/services/Archival/FilterLists.Archival.Infrastructure/Scheduling/ScheduleMediator.cs index 64ebce7d0..8edba74de 100644 --- a/services/Archival/FilterLists.Archival.Infrastructure/Scheduling/ScheduleMediator.cs +++ b/services/Archival/FilterLists.Archival.Infrastructure/Scheduling/ScheduleMediator.cs @@ -32,7 +32,7 @@ public static IGlobalConfiguration UseMediatR(this IGlobalConfiguration globalCo { /// https://codeopinion.com/background-commands-mediatr-hangfire/ GlobalConfiguration.Configuration.UseSerializerSettings( - new JsonSerializerSettings {TypeNameHandling = TypeNameHandling.Objects}); + new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Objects }); return globalConfiguration; } } diff --git a/services/Directory/FilterLists.Directory.Api/Controllers/BaseController.cs b/services/Directory/FilterLists.Directory.Api/Controllers/BaseController.cs index aaf0fef1b..5e05f0753 100644 --- a/services/Directory/FilterLists.Directory.Api/Controllers/BaseController.cs +++ b/services/Directory/FilterLists.Directory.Api/Controllers/BaseController.cs @@ -31,7 +31,7 @@ protected async Task CacheGetOrCreateAsync( entry.AbsoluteExpirationRelativeToNow = absoluteExpirationRelativeToNow; return actionAsync(); }); - return result is null ? NotFound() : (IActionResult)Ok(result); + return result is null ? NotFound() : Ok(result); } } } diff --git a/services/Directory/FilterLists.Directory.Api/Controllers/LanguagesController.cs b/services/Directory/FilterLists.Directory.Api/Controllers/LanguagesController.cs index 4f384a2dc..3cc4fe24d 100644 --- a/services/Directory/FilterLists.Directory.Api/Controllers/LanguagesController.cs +++ b/services/Directory/FilterLists.Directory.Api/Controllers/LanguagesController.cs @@ -19,7 +19,7 @@ public LanguagesController(IMemoryCache cache, IMediator mediator) : base(cache) } /// - /// Gets the languages targeted by FilterLists. + /// Gets the languages targeted by FilterLists. /// /// The cancellation token. /// The languages targeted by FilterLists. diff --git a/services/Directory/FilterLists.Directory.Api/Controllers/LicensesController.cs b/services/Directory/FilterLists.Directory.Api/Controllers/LicensesController.cs index 3c7779919..63e475222 100644 --- a/services/Directory/FilterLists.Directory.Api/Controllers/LicensesController.cs +++ b/services/Directory/FilterLists.Directory.Api/Controllers/LicensesController.cs @@ -19,7 +19,7 @@ public LicensesController(IMemoryCache cache, IMediator mediator) : base(cache) } /// - /// Gets the licenses applied to FilterLists. + /// Gets the licenses applied to FilterLists. /// /// The cancellation token. /// The licenses applied to FilterLists. diff --git a/services/Directory/FilterLists.Directory.Api/Controllers/ListsController.cs b/services/Directory/FilterLists.Directory.Api/Controllers/ListsController.cs index f9f7138d4..0ef61471b 100644 --- a/services/Directory/FilterLists.Directory.Api/Controllers/ListsController.cs +++ b/services/Directory/FilterLists.Directory.Api/Controllers/ListsController.cs @@ -20,7 +20,7 @@ public ListsController(IMemoryCache cache, IMediator mediator) : base(cache) } /// - /// Gets the FilterLists.. + /// Gets the FilterLists.. /// /// The cancellation token. /// The FilterLists. @@ -33,7 +33,7 @@ public async Task Get(CancellationToken cancellationToken) } /// - /// Gets the details of the FilterList. + /// Gets the details of the FilterList. /// /// The identifier of the FilterList. /// The cancellation token. @@ -43,7 +43,8 @@ public async Task Get(CancellationToken cancellationToken) [ProducesResponseType(StatusCodes.Status404NotFound)] public async Task GetDetails(int id, CancellationToken cancellationToken) { - return await CacheGetOrCreateAsync(() => _mediator.Send(new GetListDetails.Query(id), cancellationToken), id); + return await CacheGetOrCreateAsync(() => _mediator.Send(new GetListDetails.Query(id), cancellationToken), + id); } } } diff --git a/services/Directory/FilterLists.Directory.Api/Controllers/MaintainersController.cs b/services/Directory/FilterLists.Directory.Api/Controllers/MaintainersController.cs index 1fd340904..7afbdfc25 100644 --- a/services/Directory/FilterLists.Directory.Api/Controllers/MaintainersController.cs +++ b/services/Directory/FilterLists.Directory.Api/Controllers/MaintainersController.cs @@ -19,7 +19,7 @@ public MaintainersController(IMemoryCache cache, IMediator mediator) : base(cach } /// - /// Gets the maintainers of FilterLists. + /// Gets the maintainers of FilterLists. /// /// The cancellation token. /// The maintainers of FilterLists. diff --git a/services/Directory/FilterLists.Directory.Api/Controllers/SoftwareController.cs b/services/Directory/FilterLists.Directory.Api/Controllers/SoftwareController.cs index c3f7cf0e3..32802a52c 100644 --- a/services/Directory/FilterLists.Directory.Api/Controllers/SoftwareController.cs +++ b/services/Directory/FilterLists.Directory.Api/Controllers/SoftwareController.cs @@ -19,7 +19,7 @@ public SoftwareController(IMemoryCache cache, IMediator mediator) : base(cache) } /// - /// Gets the software that subscribes to FilterLists. + /// Gets the software that subscribes to FilterLists. /// /// The cancellation token. /// The software that subscribes to FilterLists. diff --git a/services/Directory/FilterLists.Directory.Api/Controllers/SyntaxesController.cs b/services/Directory/FilterLists.Directory.Api/Controllers/SyntaxesController.cs index 052a91fd5..6c6de1b00 100644 --- a/services/Directory/FilterLists.Directory.Api/Controllers/SyntaxesController.cs +++ b/services/Directory/FilterLists.Directory.Api/Controllers/SyntaxesController.cs @@ -19,7 +19,7 @@ public SyntaxesController(IMemoryCache cache, IMediator mediator) : base(cache) } /// - /// Gets the syntaxes of FilterLists. + /// Gets the syntaxes of FilterLists. /// /// The cancellation token. /// The syntaxes of FilterLists. diff --git a/services/Directory/FilterLists.Directory.Api/Controllers/TagsController.cs b/services/Directory/FilterLists.Directory.Api/Controllers/TagsController.cs index 2940d5895..2fced535a 100644 --- a/services/Directory/FilterLists.Directory.Api/Controllers/TagsController.cs +++ b/services/Directory/FilterLists.Directory.Api/Controllers/TagsController.cs @@ -19,7 +19,7 @@ public TagsController(IMemoryCache cache, IMediator mediator) : base(cache) } /// - /// Gets the tags of FilterLists. + /// Gets the tags of FilterLists. /// /// The cancellation token. /// The tags of FilterLists. diff --git a/services/Directory/FilterLists.Directory.Api/FilterLists.Directory.Api.csproj b/services/Directory/FilterLists.Directory.Api/FilterLists.Directory.Api.csproj index 6f3f00116..d9e4e66eb 100644 --- a/services/Directory/FilterLists.Directory.Api/FilterLists.Directory.Api.csproj +++ b/services/Directory/FilterLists.Directory.Api/FilterLists.Directory.Api.csproj @@ -1,43 +1,44 @@  - - Exe - net5.0 - enable - true - true - linux-musl-x64;win10-x64 - + + Exe + net5.0 + enable + true + true + linux-musl-x64;win10-x64 + - - Collin M. Barrett - FilterLists - FilterLists Directory - The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances. - Copyright (c) 2021 Collin M. Barrett - https://github.com/collinbarrett/FilterLists - https://filterlists.com - Linux - ..\.. - ..\..\..\docker-compose\docker-compose.dcproj - + + Collin M. Barrett + FilterLists + FilterLists Directory + The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances. + Copyright (c) 2021 Collin M. Barrett + https://github.com/collinbarrett/FilterLists + https://filterlists.com + Linux + ..\.. + ..\..\..\docker-compose\docker-compose.dcproj + - - - + + + - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + - - - - + + + + \ No newline at end of file diff --git a/services/Directory/FilterLists.Directory.Api/SwaggerExtensions.cs b/services/Directory/FilterLists.Directory.Api/SwaggerExtensions.cs index 7b63feb78..7133ec8e9 100644 --- a/services/Directory/FilterLists.Directory.Api/SwaggerExtensions.cs +++ b/services/Directory/FilterLists.Directory.Api/SwaggerExtensions.cs @@ -20,7 +20,7 @@ public static void AddSwaggerGen(this IServiceCollection services) Description = "An ASP.NET Core API serving the core FilterList information.", Version = "v1", //TermsOfService = "", - Contact = new OpenApiContact {Name = "FilterLists", Url = new Uri("https://filterlists.com")}, + Contact = new OpenApiContact { Name = "FilterLists", Url = new Uri("https://filterlists.com") }, License = new OpenApiLicense { Name = "MIT License", @@ -42,9 +42,9 @@ public static void UseSwagger(this IApplicationBuilder app) o.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.Servers = new List { #if DEBUG - new OpenApiServer {Url = $"{httpReq.Scheme}://{httpReq.Host.Value}:8080/api/directory"} + new() { Url = $"{httpReq.Scheme}://{httpReq.Host.Value}:8080/api/directory" } #else - new OpenApiServer {Url = $"https://{httpReq.Host.Value}/api/directory"} + new() { Url = $"https://{httpReq.Host.Value}/api/directory" } #endif }); }); diff --git a/services/Directory/FilterLists.Directory.Application/ConfigurationExtensions.cs b/services/Directory/FilterLists.Directory.Application/ConfigurationExtensions.cs index ee469eb1b..98ce43e4a 100644 --- a/services/Directory/FilterLists.Directory.Application/ConfigurationExtensions.cs +++ b/services/Directory/FilterLists.Directory.Application/ConfigurationExtensions.cs @@ -1,5 +1,4 @@ -using AutoMapper; -using FilterLists.Directory.Infrastructure; +using FilterLists.Directory.Infrastructure; using MediatR; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Configuration; diff --git a/services/Directory/FilterLists.Directory.Application/FilterLists.Directory.Application.csproj b/services/Directory/FilterLists.Directory.Application/FilterLists.Directory.Application.csproj index 88cafc5d3..3efe43b4a 100644 --- a/services/Directory/FilterLists.Directory.Application/FilterLists.Directory.Application.csproj +++ b/services/Directory/FilterLists.Directory.Application/FilterLists.Directory.Application.csproj @@ -1,28 +1,28 @@  - - net5.0 - enable - + + net5.0 + enable + - - Collin M. Barrett - FilterLists - FilterLists Directory - The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances. - Copyright (c) 2021 Collin M. Barrett - https://github.com/collinbarrett/FilterLists - https://filterlists.com - + + Collin M. Barrett + FilterLists + FilterLists Directory + The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances. + Copyright (c) 2021 Collin M. Barrett + https://github.com/collinbarrett/FilterLists + https://filterlists.com + - - - - + + + + - - - - + + + + \ No newline at end of file diff --git a/services/Directory/FilterLists.Directory.Application/Queries/GetLanguages.cs b/services/Directory/FilterLists.Directory.Application/Queries/GetLanguages.cs index 4f3b36989..e5f59e486 100644 --- a/services/Directory/FilterLists.Directory.Application/Queries/GetLanguages.cs +++ b/services/Directory/FilterLists.Directory.Application/Queries/GetLanguages.cs @@ -47,7 +47,8 @@ public LanguageVmProfile() CreateMap() .ForMember(l => l.FilterListIds, o => o.MapFrom(l => - l.FilterListLanguages.Select(fll => fll.FilterListId).OrderBy(flid => flid).AsEnumerable())); + l.FilterListLanguages.Select(fll => fll.FilterListId).OrderBy(flid => flid) + .AsEnumerable())); } } diff --git a/services/Directory/FilterLists.Directory.Application/Queries/GetListDetails.cs b/services/Directory/FilterLists.Directory.Application/Queries/GetListDetails.cs index 286de46f8..b3c8eacd9 100644 --- a/services/Directory/FilterLists.Directory.Application/Queries/GetListDetails.cs +++ b/services/Directory/FilterLists.Directory.Application/Queries/GetListDetails.cs @@ -63,25 +63,32 @@ public ListDetailsVmProfile() fl.ViewUrls.OrderBy(u => u.SegmentNumber).ThenBy(u => u.Primariness).AsEnumerable())) .ForMember(fl => fl.MaintainerIds, o => o.MapFrom(fl => - fl.FilterListMaintainers.Select(flm => flm.MaintainerId).OrderBy(mid => mid).AsEnumerable())) + fl.FilterListMaintainers.Select(flm => flm.MaintainerId).OrderBy(mid => mid) + .AsEnumerable())) .ForMember(fl => fl.UpstreamFilterListIds, o => o.MapFrom(fl => - fl.UpstreamFilterLists.Select(ufl => ufl.UpstreamFilterListId).OrderBy(flid => flid).AsEnumerable())) + fl.UpstreamFilterLists.Select(ufl => ufl.UpstreamFilterListId).OrderBy(flid => flid) + .AsEnumerable())) .ForMember(fl => fl.ForkFilterListIds, o => o.MapFrom(fl => - fl.ForkFilterLists.Select(ffl => ffl.ForkFilterListId).OrderBy(flid => flid).AsEnumerable())) + fl.ForkFilterLists.Select(ffl => ffl.ForkFilterListId).OrderBy(flid => flid) + .AsEnumerable())) .ForMember(fl => fl.IncludedInFilterListIds, o => o.MapFrom(fl => - fl.IncludedInFilterLists.Select(iifl => iifl.IncludedInFilterListId).OrderBy(flid => flid).AsEnumerable())) + fl.IncludedInFilterLists.Select(iifl => iifl.IncludedInFilterListId).OrderBy(flid => flid) + .AsEnumerable())) .ForMember(fl => fl.IncludesFilterListIds, o => o.MapFrom(fl => - fl.IncludesFilterLists.Select(ifl => ifl.IncludesFilterListId).OrderBy(flid => flid).AsEnumerable())) + fl.IncludesFilterLists.Select(ifl => ifl.IncludesFilterListId).OrderBy(flid => flid) + .AsEnumerable())) .ForMember(fl => fl.DependencyFilterListIds, o => o.MapFrom(fl => - fl.DependencyFilterLists.Select(dfl => dfl.DependencyFilterListId).OrderBy(flid => flid).AsEnumerable())) + fl.DependencyFilterLists.Select(dfl => dfl.DependencyFilterListId).OrderBy(flid => flid) + .AsEnumerable())) .ForMember(fl => fl.DependentFilterListIds, o => o.MapFrom(fl => - fl.DependentFilterLists.Select(dfl => dfl.DependentFilterListId).OrderBy(flid => flid).AsEnumerable())); + fl.DependentFilterLists.Select(dfl => dfl.DependentFilterListId).OrderBy(flid => flid) + .AsEnumerable())); } } diff --git a/services/Directory/FilterLists.Directory.Application/Queries/GetLists.cs b/services/Directory/FilterLists.Directory.Application/Queries/GetLists.cs index b2bfe1e0b..c4d723e5a 100644 --- a/services/Directory/FilterLists.Directory.Application/Queries/GetLists.cs +++ b/services/Directory/FilterLists.Directory.Application/Queries/GetLists.cs @@ -56,7 +56,8 @@ public ListVmProfile() fl.FilterListTags.Select(flt => flt.TagId).OrderBy(tid => tid).AsEnumerable())) .ForMember(fl => fl.MaintainerIds, o => o.MapFrom(fl => - fl.FilterListMaintainers.Select(flm => flm.MaintainerId).OrderBy(mid => mid).AsEnumerable())); + fl.FilterListMaintainers.Select(flm => flm.MaintainerId).OrderBy(mid => mid) + .AsEnumerable())); } } } diff --git a/services/Directory/FilterLists.Directory.Application/Queries/GetMaintainers.cs b/services/Directory/FilterLists.Directory.Application/Queries/GetMaintainers.cs index 82fe86e64..94a39d5b9 100644 --- a/services/Directory/FilterLists.Directory.Application/Queries/GetMaintainers.cs +++ b/services/Directory/FilterLists.Directory.Application/Queries/GetMaintainers.cs @@ -47,7 +47,8 @@ public MaintainerVmProfile() CreateMap() .ForMember(m => m.FilterListIds, o => o.MapFrom(m => - m.FilterListMaintainers.Select(flm => flm.FilterListId).OrderBy(flid => flid).AsEnumerable())); + m.FilterListMaintainers.Select(flm => flm.FilterListId).OrderBy(flid => flid) + .AsEnumerable())); } } diff --git a/services/Directory/FilterLists.Directory.Infrastructure.Migrations.Tests/FilterLists.Directory.Infrastructure.Migrations.Tests.csproj b/services/Directory/FilterLists.Directory.Infrastructure.Migrations.Tests/FilterLists.Directory.Infrastructure.Migrations.Tests.csproj index 63607e8ad..d92be0954 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure.Migrations.Tests/FilterLists.Directory.Infrastructure.Migrations.Tests.csproj +++ b/services/Directory/FilterLists.Directory.Infrastructure.Migrations.Tests/FilterLists.Directory.Infrastructure.Migrations.Tests.csproj @@ -1,34 +1,35 @@  - - net5.0 - enable - false - linux-musl-x64;win10-x64 - + + net5.0 + enable + false + linux-musl-x64;win10-x64 + - - Collin M. Barrett - FilterLists - FilterLists Directory - The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances. - Copyright (c) 2021 Collin M. Barrett - https://github.com/collinbarrett/FilterLists - https://filterlists.com - + + Collin M. Barrett + FilterLists + FilterLists Directory + The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances. + Copyright (c) 2021 Collin M. Barrett + https://github.com/collinbarrett/FilterLists + https://filterlists.com + - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - - - + + + + \ No newline at end of file diff --git a/services/Directory/FilterLists.Directory.Infrastructure/FilterLists.Directory.Infrastructure.csproj b/services/Directory/FilterLists.Directory.Infrastructure/FilterLists.Directory.Infrastructure.csproj index 66b9a8eea..6445c0815 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/FilterLists.Directory.Infrastructure.csproj +++ b/services/Directory/FilterLists.Directory.Infrastructure/FilterLists.Directory.Infrastructure.csproj @@ -1,27 +1,28 @@  - - net5.0 - enable - + + net5.0 + enable + - - Collin M. Barrett - FilterLists - FilterLists Directory - The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances. - Copyright (c) 2021 Collin M. Barrett - https://github.com/collinbarrett/FilterLists - https://filterlists.com - + + Collin M. Barrett + FilterLists + FilterLists Directory + The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances. + Copyright (c) 2021 Collin M. Barrett + https://github.com/collinbarrett/FilterLists + https://filterlists.com + - - - - + + + + - - - + + + \ No newline at end of file diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Dependent.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Dependent.cs index 19475b976..d03f82c06 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Dependent.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Dependent.cs @@ -6,9 +6,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities public class Dependent { public int DependencyFilterListId { get; set; } - public FilterList DependencyFilterList { get; private set; } = null!; + public FilterList DependencyFilterList { get; } = null!; public int DependentFilterListId { get; set; } - public FilterList DependentFilterList { get; private set; } = null!; + public FilterList DependentFilterList { get; } = null!; } internal class DependentTypeConfiguration : IEntityTypeConfiguration @@ -16,7 +16,7 @@ internal class DependentTypeConfiguration : IEntityTypeConfiguration public virtual void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(Dependent) + "s"); - builder.HasKey(d => new {d.DependencyFilterListId, d.DependentFilterListId}); + builder.HasKey(d => new { d.DependencyFilterListId, d.DependentFilterListId }); builder.HasOne(d => d.DependencyFilterList) .WithMany(fl => fl.DependentFilterLists) .HasForeignKey(d => d.DependencyFilterListId); diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterList.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterList.cs index 1a039d88b..8704ac66e 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterList.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterList.cs @@ -13,10 +13,10 @@ public class FilterList public string? Description { get; set; } public int? LicenseId { get; set; } public License? License { get; set; } - public IReadOnlyCollection FilterListSyntaxes { get; private set; } = new HashSet(); - public IReadOnlyCollection FilterListLanguages { get; private set; } = new HashSet(); - public IReadOnlyCollection FilterListTags { get; private set; } = new HashSet(); - public IReadOnlyCollection ViewUrls { get; private set; } = new HashSet(); + public IReadOnlyCollection FilterListSyntaxes { get; } = new HashSet(); + public IReadOnlyCollection FilterListLanguages { get; } = new HashSet(); + public IReadOnlyCollection FilterListTags { get; } = new HashSet(); + public IReadOnlyCollection ViewUrls { get; } = new HashSet(); public Uri? HomeUrl { get; set; } public Uri? OnionUrl { get; set; } public Uri? PolicyUrl { get; set; } @@ -26,13 +26,16 @@ public class FilterList public Uri? ChatUrl { get; set; } public string? EmailAddress { get; set; } public Uri? DonateUrl { get; set; } - public IReadOnlyCollection FilterListMaintainers { get; private set; } = new HashSet(); - public IReadOnlyCollection UpstreamFilterLists { get; private set; } = new HashSet(); - public IReadOnlyCollection ForkFilterLists { get; private set; } = new HashSet(); - public IReadOnlyCollection IncludedInFilterLists { get; private set; } = new HashSet(); - public IReadOnlyCollection IncludesFilterLists { get; private set; } = new HashSet(); - public IReadOnlyCollection DependencyFilterLists { get; private set; } = new HashSet(); - public IReadOnlyCollection DependentFilterLists { get; private set; } = new HashSet(); + + public IReadOnlyCollection FilterListMaintainers { get; } = + new HashSet(); + + public IReadOnlyCollection UpstreamFilterLists { get; } = new HashSet(); + public IReadOnlyCollection ForkFilterLists { get; } = new HashSet(); + public IReadOnlyCollection IncludedInFilterLists { get; } = new HashSet(); + public IReadOnlyCollection IncludesFilterLists { get; } = new HashSet(); + public IReadOnlyCollection DependencyFilterLists { get; } = new HashSet(); + public IReadOnlyCollection DependentFilterLists { get; } = new HashSet(); } internal class FilterListTypeConfiguration : IEntityTypeConfiguration diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListLanguage.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListLanguage.cs index a8e62076b..54a4e8b3d 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListLanguage.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListLanguage.cs @@ -6,9 +6,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities public class FilterListLanguage { public int FilterListId { get; set; } - public FilterList FilterList { get; private set; } = null!; + public FilterList FilterList { get; } = null!; public string Iso6391 { get; set; } = null!; - public Language Language { get; private set; } = null!; + public Language Language { get; } = null!; } internal class FilterListLanguageTypeConfiguration : IEntityTypeConfiguration @@ -16,7 +16,7 @@ internal class FilterListLanguageTypeConfiguration : IEntityTypeConfiguration builder) { builder.ToTable(nameof(FilterListLanguage) + "s"); - builder.HasKey(fll => new {fll.FilterListId, fll.Iso6391}); + builder.HasKey(fll => new { fll.FilterListId, fll.Iso6391 }); builder.HasDataJsonFile(); } } diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListMaintainer.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListMaintainer.cs index c36ac2f91..817b86308 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListMaintainer.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListMaintainer.cs @@ -6,9 +6,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities public class FilterListMaintainer { public int FilterListId { get; set; } - public FilterList FilterList { get; private set; } = null!; + public FilterList FilterList { get; } = null!; public int MaintainerId { get; set; } - public Maintainer Maintainer { get; private set; } = null!; + public Maintainer Maintainer { get; } = null!; } internal class FilterListMaintainerTypeConfiguration : IEntityTypeConfiguration @@ -16,7 +16,7 @@ internal class FilterListMaintainerTypeConfiguration : IEntityTypeConfiguration< public virtual void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(FilterListMaintainer) + "s"); - builder.HasKey(flm => new {flm.FilterListId, flm.MaintainerId}); + builder.HasKey(flm => new { flm.FilterListId, flm.MaintainerId }); builder.HasDataJsonFile(); } } diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListSyntax.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListSyntax.cs index f691d33a0..656811eaa 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListSyntax.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListSyntax.cs @@ -6,9 +6,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities public class FilterListSyntax { public int FilterListId { get; set; } - public FilterList FilterList { get; private set; } = null!; + public FilterList FilterList { get; } = null!; public int SyntaxId { get; set; } - public Syntax Syntax { get; private set; } = null!; + public Syntax Syntax { get; } = null!; } internal class FilterListSyntaxTypeConfiguration : IEntityTypeConfiguration @@ -16,7 +16,7 @@ internal class FilterListSyntaxTypeConfiguration : IEntityTypeConfiguration builder) { builder.ToTable(nameof(FilterListSyntax) + "es"); - builder.HasKey(fls => new {fls.FilterListId, fls.SyntaxId}); + builder.HasKey(fls => new { fls.FilterListId, fls.SyntaxId }); builder.HasDataJsonFile(); } } diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListTag.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListTag.cs index ff6923cdc..b48ac2cc1 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListTag.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListTag.cs @@ -6,9 +6,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities public class FilterListTag { public int FilterListId { get; set; } - public FilterList FilterList { get; private set; } = null!; + public FilterList FilterList { get; } = null!; public int TagId { get; set; } - public Tag Tag { get; private set; } = null!; + public Tag Tag { get; } = null!; } internal class FilterListTagTypeConfiguration : IEntityTypeConfiguration @@ -16,7 +16,7 @@ internal class FilterListTagTypeConfiguration : IEntityTypeConfiguration builder) { builder.ToTable(nameof(FilterListTag) + "s"); - builder.HasKey(flt => new {flt.FilterListId, flt.TagId}); + builder.HasKey(flt => new { flt.FilterListId, flt.TagId }); builder.HasDataJsonFile(); } } diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListViewUrl.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListViewUrl.cs index 4d057b5ab..5cfd879b2 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListViewUrl.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/FilterListViewUrl.cs @@ -21,7 +21,7 @@ public virtual void Configure(EntityTypeBuilder builder) builder.ToTable(nameof(FilterListViewUrl) + "s"); builder.Property(u => u.SegmentNumber).HasDefaultValue(1); builder.Property(u => u.Primariness).HasDefaultValue(1); - builder.HasIndex(u => new {u.FilterListId, u.SegmentNumber, u.Primariness}).IsUnique(); + builder.HasIndex(u => new { u.FilterListId, u.SegmentNumber, u.Primariness }).IsUnique(); builder.HasDataJsonFile(); } } diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Fork.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Fork.cs index f334f3639..9bf16d819 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Fork.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Fork.cs @@ -6,9 +6,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities public class Fork { public int UpstreamFilterListId { get; set; } - public FilterList UpstreamFilterList { get; private set; } = null!; + public FilterList UpstreamFilterList { get; } = null!; public int ForkFilterListId { get; set; } - public FilterList ForkFilterList { get; private set; } = null!; + public FilterList ForkFilterList { get; } = null!; } internal class ForkTypeConfiguration : IEntityTypeConfiguration @@ -16,7 +16,7 @@ internal class ForkTypeConfiguration : IEntityTypeConfiguration public virtual void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(Fork) + "s"); - builder.HasKey(f => new {f.UpstreamFilterListId, f.ForkFilterListId}); + builder.HasKey(f => new { f.UpstreamFilterListId, f.ForkFilterListId }); builder.HasOne(f => f.UpstreamFilterList) .WithMany(fl => fl.ForkFilterLists) .HasForeignKey(f => f.UpstreamFilterListId); diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Language.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Language.cs index e9e96471f..a93c2e86c 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Language.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Language.cs @@ -8,7 +8,7 @@ public class Language { public string Iso6391 { get; set; } = null!; public string Name { get; set; } = null!; - public IReadOnlyCollection FilterListLanguages { get; private set; } = new HashSet(); + public IReadOnlyCollection FilterListLanguages { get; } = new HashSet(); } internal class LanguageTypeConfiguration : IEntityTypeConfiguration diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/License.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/License.cs index bbef91a06..2be08ed5c 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/License.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/License.cs @@ -13,7 +13,7 @@ public class License public bool PermitsModification { get; set; } public bool PermitsDistribution { get; set; } public bool PermitsCommercialUse { get; set; } - public IReadOnlyCollection FilterLists { get; private set; } = new HashSet(); + public IReadOnlyCollection FilterLists { get; } = new HashSet(); } internal class LicenseTypeConfiguration : IEntityTypeConfiguration diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Maintainer.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Maintainer.cs index df4e81ac0..a6b6a8baa 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Maintainer.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Maintainer.cs @@ -12,7 +12,9 @@ public class Maintainer public Uri? Url { get; set; } public string? EmailAddress { get; set; } public string? TwitterHandle { get; set; } - public IReadOnlyCollection FilterListMaintainers { get; private set; } = new HashSet(); + + public IReadOnlyCollection FilterListMaintainers { get; } = + new HashSet(); } internal class MaintainerTypeConfiguration : IEntityTypeConfiguration diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Merge.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Merge.cs index 8f71d05f6..48240523d 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Merge.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Merge.cs @@ -6,9 +6,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities public class Merge { public int IncludedInFilterListId { get; set; } - public FilterList IncludedInFilterList { get; private set; } = null!; + public FilterList IncludedInFilterList { get; } = null!; public int IncludesFilterListId { get; set; } - public FilterList IncludesFilterList { get; private set; } = null!; + public FilterList IncludesFilterList { get; } = null!; } internal class MergeTypeConfiguration : IEntityTypeConfiguration @@ -16,7 +16,7 @@ internal class MergeTypeConfiguration : IEntityTypeConfiguration public virtual void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(Merge) + "s"); - builder.HasKey(m => new {m.IncludedInFilterListId, m.IncludesFilterListId}); + builder.HasKey(m => new { m.IncludedInFilterListId, m.IncludesFilterListId }); builder.HasOne(m => m.IncludedInFilterList) .WithMany(fl => fl.IncludesFilterLists) .HasForeignKey(m => m.IncludedInFilterListId); diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Software.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Software.cs index 51ed8c7a4..d7c87641e 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Software.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Software.cs @@ -13,7 +13,7 @@ public class Software public Uri? HomeUrl { get; set; } public Uri? DownloadUrl { get; set; } public bool SupportsAbpUrlScheme { get; set; } - public IReadOnlyCollection SoftwareSyntaxes { get; private set; } = new HashSet(); + public IReadOnlyCollection SoftwareSyntaxes { get; } = new HashSet(); } internal class SoftwareTypeConfiguration : IEntityTypeConfiguration diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/SoftwareSyntax.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/SoftwareSyntax.cs index 96734f782..a3c4c5d32 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/SoftwareSyntax.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/SoftwareSyntax.cs @@ -6,9 +6,9 @@ namespace FilterLists.Directory.Infrastructure.Persistence.Queries.Entities public class SoftwareSyntax { public int SoftwareId { get; set; } - public Software Software { get; private set; } = null!; + public Software Software { get; } = null!; public int SyntaxId { get; set; } - public Syntax Syntax { get; private set; } = null!; + public Syntax Syntax { get; } = null!; } internal class SoftwareSyntaxTypeConfiguration : IEntityTypeConfiguration @@ -16,7 +16,7 @@ internal class SoftwareSyntaxTypeConfiguration : IEntityTypeConfiguration builder) { builder.ToTable(nameof(SoftwareSyntax) + "es"); - builder.HasKey(ss => new {ss.SoftwareId, ss.SyntaxId}); + builder.HasKey(ss => new { ss.SoftwareId, ss.SyntaxId }); builder.HasDataJsonFile(); } } diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Syntax.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Syntax.cs index a5e47a21d..f9685e81f 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Syntax.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Syntax.cs @@ -11,8 +11,8 @@ public class Syntax public string Name { get; set; } = null!; public string? Description { get; set; } public Uri? Url { get; set; } - public IReadOnlyCollection FilterListSyntaxes { get; private set; } = new HashSet(); - public IReadOnlyCollection SoftwareSyntaxes { get; private set; } = new HashSet(); + public IReadOnlyCollection FilterListSyntaxes { get; } = new HashSet(); + public IReadOnlyCollection SoftwareSyntaxes { get; } = new HashSet(); } internal class SyntaxTypeConfiguration : IEntityTypeConfiguration diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Tag.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Tag.cs index 1426514d9..4467a1609 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Tag.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/Queries/Entities/Tag.cs @@ -9,7 +9,7 @@ public class Tag public int Id { get; set; } public string Name { get; set; } = null!; public string? Description { get; set; } - public IReadOnlyCollection FilterListTags { get; private set; } = new HashSet(); + public IReadOnlyCollection FilterListTags { get; } = new HashSet(); } internal class TagTypeConfiguration : IEntityTypeConfiguration diff --git a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/SeedExtensions.cs b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/SeedExtensions.cs index 1f0221c7d..83332945b 100644 --- a/services/Directory/FilterLists.Directory.Infrastructure/Persistence/SeedExtensions.cs +++ b/services/Directory/FilterLists.Directory.Infrastructure/Persistence/SeedExtensions.cs @@ -32,7 +32,7 @@ public static void HasDataJsonFile(this EntityTypeBuilder entityTypeBui var entitiesJson = File.ReadAllText(path); var entities = JsonSerializer.Deserialize>(entitiesJson, - new JsonSerializerOptions {PropertyNamingPolicy = JsonNamingPolicy.CamelCase}); + new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }); if (entities != null) { diff --git a/services/FilterLists.sln.DotSettings b/services/FilterLists.sln.DotSettings deleted file mode 100644 index 1bf63049e..000000000 --- a/services/FilterLists.sln.DotSettings +++ /dev/null @@ -1,42 +0,0 @@ - - <?xml version="1.0" encoding="utf-16"?><Profile name="FilterLists Cleanup"><CSReorderTypeMembers>True</CSReorderTypeMembers><XMLReformatCode>True</XMLReformatCode><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="True" ArrangeBraces="True" ArrangeAttributes="True" ArrangeArgumentsStyle="True" ArrangeCodeBodyStyle="True" ArrangeVarStyle="True" ArrangeTrailingCommas="True" /><RemoveCodeRedundanciesVB>True</RemoveCodeRedundanciesVB><Xaml.RedundantFreezeAttribute>True</Xaml.RedundantFreezeAttribute><Xaml.RemoveRedundantModifiersAttribute>True</Xaml.RemoveRedundantModifiersAttribute><Xaml.RemoveRedundantNameAttribute>True</Xaml.RemoveRedundantNameAttribute><Xaml.RemoveRedundantResource>True</Xaml.RemoveRedundantResource><Xaml.RemoveRedundantCollectionProperty>True</Xaml.RemoveRedundantCollectionProperty><Xaml.RemoveRedundantAttachedPropertySetter>True</Xaml.RemoveRedundantAttachedPropertySetter><Xaml.RemoveRedundantStyledValue>True</Xaml.RemoveRedundantStyledValue><Xaml.RemoveRedundantNamespaceAlias>True</Xaml.RemoveRedundantNamespaceAlias><Xaml.RemoveForbiddenResourceName>True</Xaml.RemoveForbiddenResourceName><Xaml.RemoveRedundantGridDefinitionsAttribute>True</Xaml.RemoveRedundantGridDefinitionsAttribute><Xaml.RemoveRedundantGridSpanAttribut>True</Xaml.RemoveRedundantGridSpanAttribut><Xaml.RemoveRedundantUpdateSourceTriggerAttribute>True</Xaml.RemoveRedundantUpdateSourceTriggerAttribute><Xaml.RemoveRedundantBindingModeAttribute>True</Xaml.RemoveRedundantBindingModeAttribute><FormatAttributeQuoteDescriptor>True</FormatAttributeQuoteDescriptor><CorrectVariableKindsDescriptor>True</CorrectVariableKindsDescriptor><VariablesToInnerScopesDescriptor>True</VariablesToInnerScopesDescriptor><StringToTemplatesDescriptor>True</StringToTemplatesDescriptor><RemoveRedundantQualifiersTs>True</RemoveRedundantQualifiersTs><OptimizeImportsTs>True</OptimizeImportsTs><OptimizeReferenceCommentsTs>True</OptimizeReferenceCommentsTs><PublicModifierStyleTs>True</PublicModifierStyleTs><ExplicitAnyTs>True</ExplicitAnyTs><TypeAnnotationStyleTs>True</TypeAnnotationStyleTs><RelativePathStyleTs>True</RelativePathStyleTs><AsInsteadOfCastTs>True</AsInsteadOfCastTs><CssAlphabetizeProperties>True</CssAlphabetizeProperties><JsInsertSemicolon>True</JsInsertSemicolon><JsReformatCode>True</JsReformatCode><JsFormatDocComments>True</JsFormatDocComments><HtmlReformatCode>True</HtmlReformatCode><AspOptimizeRegisterDirectives>True</AspOptimizeRegisterDirectives><VBOptimizeImports>True</VBOptimizeImports><VBShortenReferences>True</VBShortenReferences><RemoveCodeRedundancies>True</RemoveCodeRedundancies><CSUseAutoProperty>True</CSUseAutoProperty><CSMakeFieldReadonly>True</CSMakeFieldReadonly><CSArrangeQualifiers>True</CSArrangeQualifiers><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CssReformatCode>True</CssReformatCode><VBReformatCode>True</VBReformatCode><VBFormatDocComments>True</VBFormatDocComments><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSharpFormatDocComments>True</CSharpFormatDocComments></Profile> - FilterLists Cleanup - NEVER - False - True - CHOP_IF_LONG - CHOP_IF_LONG - CHOP_IF_LONG - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - DO_NOTHING - True - True - True - True - True - True - True - True - True - True - \ No newline at end of file