diff --git a/Finch.Raven/FinchStore.cs b/Finch.Raven/FinchStore.cs index 39b2dff7..a1e7de1a 100644 --- a/Finch.Raven/FinchStore.cs +++ b/Finch.Raven/FinchStore.cs @@ -15,7 +15,7 @@ public class FinchStore : IFinchStore /// - public IDocumentStore Raven { get; private set; } + public IDocumentStore Raven { get; } /// diff --git a/Finch.Raven/Interceptors/InterceptorInstruction.cs b/Finch.Raven/Interceptors/InterceptorInstruction.cs index 0ef6efa5..3970022b 100644 --- a/Finch.Raven/Interceptors/InterceptorInstruction.cs +++ b/Finch.Raven/Interceptors/InterceptorInstruction.cs @@ -6,27 +6,27 @@ public class InterceptorInstruction where T : FinchIdEntity, new() { public Guid Guid { get; private set; } - public InterceptorRunType Runtype { get; private set; } + public InterceptorRunType Runtype { get; } - public T Model { get; private set; } + public T Model { get; } - public T PreviousModel { get; private set; } + public T PreviousModel { get; } - public Type ModelType { get; private set; } + public Type ModelType { get; } public Result Result { get; private set; } - protected IFinchContext Context { get; private set; } + protected IFinchContext Context { get; } - protected IFinchStore Store { get; private set; } + protected IFinchStore Store { get; } - protected Lazy> Interceptors { get; private set; } + protected Lazy> Interceptors { get; } - protected Dictionary InterceptorCache { get; private set; } = new(); + protected Dictionary InterceptorCache { get; } = new(); - protected IInterceptors InterceptorHandler { get; private set; } + protected IInterceptors InterceptorHandler { get; } - protected ILogger Logger { get; private set; } + protected ILogger Logger { get; } protected Func InterceptorFilter { get; private set; } = x => true; diff --git a/Finch.Raven/Operations/RavenOperations.cs b/Finch.Raven/Operations/RavenOperations.cs index 1f1d1a83..fd578b19 100644 --- a/Finch.Raven/Operations/RavenOperations.cs +++ b/Finch.Raven/Operations/RavenOperations.cs @@ -15,13 +15,13 @@ public partial class RavenOperations : IRavenOperations protected IFinchContext Context { get; private set; } - protected IInterceptors Interceptors { get; private set; } + protected IInterceptors Interceptors { get; } - protected FlavorOptions Flavors { get; private set; } + protected FlavorOptions Flavors { get; } - protected IServiceProvider Services { get; private set; } + protected IServiceProvider Services { get; } - protected IFinchStore Store { get; private set; } + protected IFinchStore Store { get; } protected StoreInterceptorBlocker InterceptorBlocker { get; private set; } diff --git a/Finch.Raven/RavenDocumentConventionsBuilder.cs b/Finch.Raven/RavenDocumentConventionsBuilder.cs index 8a983c84..5b8f86e3 100644 --- a/Finch.Raven/RavenDocumentConventionsBuilder.cs +++ b/Finch.Raven/RavenDocumentConventionsBuilder.cs @@ -8,13 +8,13 @@ namespace Finch.Raven; public class RavenDocumentConventionsBuilder : IRavenDocumentConventionsBuilder { - protected HashSet PolymorphTypes { get; private set; } = new(); + protected HashSet PolymorphTypes { get; } = new(); protected Type AcceptsFinchConventionsType { get; set; } = typeof(ISupportsDbConventions); protected char IdentityPartsSeparator { get; set; } = '.'; - protected IFinchOptions Options { get; private set; } + protected IFinchOptions Options { get; } protected static ConcurrentDictionary CachedTypeCollectionNameMap = new(); diff --git a/Finch.Raven/Tokens/FinchTokenProvider.cs b/Finch.Raven/Tokens/FinchTokenProvider.cs index 08d3b6cb..8421b5d2 100644 --- a/Finch.Raven/Tokens/FinchTokenProvider.cs +++ b/Finch.Raven/Tokens/FinchTokenProvider.cs @@ -10,7 +10,7 @@ public class FinchTokenProvider : IFinchTokenProvider readonly RandomNumberGenerator randonNumberGenerator; - protected IFinchStore Store { get; private set; } + protected IFinchStore Store { get; } public FinchTokenProvider(IFinchStore store) diff --git a/Finch.Sqlite/Operations/DbOperations.cs b/Finch.Sqlite/Operations/DbOperations.cs index a800a02e..b46454c2 100644 --- a/Finch.Sqlite/Operations/DbOperations.cs +++ b/Finch.Sqlite/Operations/DbOperations.cs @@ -19,15 +19,15 @@ public partial class DbOperations : IDbOperations { protected IFinchContext Context { get; private set; } - protected FlavorOptions Flavors { get; private set; } + protected FlavorOptions Flavors { get; } - protected IServiceProvider Services { get; private set; } + protected IServiceProvider Services { get; } - protected IDbConnection Db { get; private set; } + protected IDbConnection Db { get; } - protected ILogger Logger { get; private set; } + protected ILogger Logger { get; } - protected IEntityModifiedHandler EntityModifiedHandler { get; private set; } + protected IEntityModifiedHandler EntityModifiedHandler { get; } public DbOperations(StoreContext context, IDbConnection db, ILogger logger, IHandlerHolder handler) diff --git a/Finch/Assemblies/AssemblyDiscoveryContext.cs b/Finch/Assemblies/AssemblyDiscoveryContext.cs index bcad9ab2..338c63f2 100644 --- a/Finch/Assemblies/AssemblyDiscoveryContext.cs +++ b/Finch/Assemblies/AssemblyDiscoveryContext.cs @@ -4,7 +4,7 @@ namespace Finch.Assemblies; public class AssemblyDiscoveryContext { - public Assembly EntryAssembly { get; private set; } + public Assembly EntryAssembly { get; } public string EntryAssemblyName { get; private set; } diff --git a/Finch/Configuration/FinchOptions.cs b/Finch/Configuration/FinchOptions.cs index c3108082..59445a7c 100644 --- a/Finch/Configuration/FinchOptions.cs +++ b/Finch/Configuration/FinchOptions.cs @@ -21,7 +21,7 @@ public class FinchOptions : IFinchOptions internal IServiceProvider ServiceProvider { get; set; } - protected ConcurrentDictionary OptionsCache { get; private set; } = new(); + protected ConcurrentDictionary OptionsCache { get; } = new(); /// diff --git a/Finch/Configuration/FinchStartupOptions.cs b/Finch/Configuration/FinchStartupOptions.cs index 9fa57835..b0966ecf 100644 --- a/Finch/Configuration/FinchStartupOptions.cs +++ b/Finch/Configuration/FinchStartupOptions.cs @@ -4,9 +4,9 @@ namespace Finch.Configuration; public class FinchStartupOptions : IFinchStartupOptions { - public IList AssemblyDiscoveryRules { get; private set; } = new List(); + public IList AssemblyDiscoveryRules { get; } = new List(); - public IMvcBuilder Mvc { get; private set; } + public IMvcBuilder Mvc { get; } public FinchStartupOptions(IMvcBuilder mvc) diff --git a/Finch/Context/FinchContext.cs b/Finch/Context/FinchContext.cs index 78609095..57ae398e 100644 --- a/Finch/Context/FinchContext.cs +++ b/Finch/Context/FinchContext.cs @@ -8,9 +8,9 @@ public class FinchContext : IFinchContext /// public IFinchOptions Options { get; protected set; } /// - public IServiceProvider Services { get; private set; } + public IServiceProvider Services { get; } - protected ICultureResolver CultureResolver { get; private set; } + protected ICultureResolver CultureResolver { get; } protected ILogger Logger { get; private set; } @@ -18,7 +18,7 @@ public class FinchContext : IFinchContext protected IHttpContextAccessor HttpContextAccessor { get; private set; } - protected IPrimitiveTypeCollection ValueCollection { get; private set; } + protected IPrimitiveTypeCollection ValueCollection { get; } bool _resolved = false; diff --git a/Finch/FileStorage/Paths.cs b/Finch/FileStorage/Paths.cs index 39a7938c..b7230975 100644 --- a/Finch/FileStorage/Paths.cs +++ b/Finch/FileStorage/Paths.cs @@ -25,7 +25,7 @@ public class Paths : IPaths const char REPLACEMENT_CHAR = '-'; - FileExtensionContentTypeProvider FileExtensionContentTypeProvider { get; set; } + FileExtensionContentTypeProvider FileExtensionContentTypeProvider { get; } static readonly Dictionary Replacements = new() { diff --git a/Finch/FinchBuilder.cs b/Finch/FinchBuilder.cs index e89de9e9..a5c2df74 100644 --- a/Finch/FinchBuilder.cs +++ b/Finch/FinchBuilder.cs @@ -20,7 +20,7 @@ public class FinchBuilder public virtual IMvcBuilder Mvc { get; } - internal static FinchModuleCollection Modules { get; private set; } = new(); + internal static FinchModuleCollection Modules { get; } = new(); readonly IConfiguration _configuration; readonly IFinchStartupOptions _startupOptions; diff --git a/Finch/Localization/CultureResolver.cs b/Finch/Localization/CultureResolver.cs index 48fb2abf..0c45d86b 100644 --- a/Finch/Localization/CultureResolver.cs +++ b/Finch/Localization/CultureResolver.cs @@ -10,9 +10,9 @@ public class CultureResolver : ICultureResolver /// public CultureInfo Current { get; protected set; } - protected ILogger Logger { get; private set; } + protected ILogger Logger { get; } - protected IMessageAggregator MessageAggregator { get; private set; } + protected IMessageAggregator MessageAggregator { get; } public CultureResolver(ILogger logger, IMessageAggregator messageAggregator) diff --git a/Finch/Localization/Localizer.cs b/Finch/Localization/Localizer.cs index 7f5e0b1c..0e6b7b0d 100644 --- a/Finch/Localization/Localizer.cs +++ b/Finch/Localization/Localizer.cs @@ -6,9 +6,9 @@ namespace Finch.Localization; public abstract class Localizer : ILocalizer { - protected ConcurrentDictionary Cache { get; private set; } = new(); + protected ConcurrentDictionary Cache { get; } = new(); - protected ICultureResolver CultureResolver { get; private set; } + protected ICultureResolver CultureResolver { get; } protected string LanguageCode { get; set; } diff --git a/Finch/Mails/LoggerMailDispatcher.cs b/Finch/Mails/LoggerMailDispatcher.cs index bb4c34a5..ab1ea024 100644 --- a/Finch/Mails/LoggerMailDispatcher.cs +++ b/Finch/Mails/LoggerMailDispatcher.cs @@ -9,7 +9,7 @@ namespace Finch.Mails; /// public class LoggerMailDispatcher : IMailDispatcher { - protected Queue Queue { get; private set; } = new Queue(); + protected Queue Queue { get; } = new Queue(); protected ILogger Logger { get; set; } diff --git a/Finch/Mails/PostmarkDispatcher.cs b/Finch/Mails/PostmarkDispatcher.cs index 35d6fd11..908b59e9 100644 --- a/Finch/Mails/PostmarkDispatcher.cs +++ b/Finch/Mails/PostmarkDispatcher.cs @@ -8,7 +8,7 @@ namespace Finch.Mails; public class PostmarkDispatcher : IMailDispatcher { - protected Queue Queue { get; private set; } = new(); + protected Queue Queue { get; } = new(); protected PostmarkClient Postmark { get; set; } diff --git a/Finch/Metadata/MetadataService.cs b/Finch/Metadata/MetadataService.cs index ca8281c7..6d81f1e8 100644 --- a/Finch/Metadata/MetadataService.cs +++ b/Finch/Metadata/MetadataService.cs @@ -8,7 +8,7 @@ public class MetadataService : IMetadataService { protected ILogger Logger { get; private set; } - protected ILocalizer Localizer { get; private set; } + protected ILocalizer Localizer { get; } public MetadataService(ILogger logger, ILocalizer localizer) diff --git a/Finch/Models/Flavors/FlavorOptions.cs b/Finch/Models/Flavors/FlavorOptions.cs index b6c758c3..4be9d0bf 100644 --- a/Finch/Models/Flavors/FlavorOptions.cs +++ b/Finch/Models/Flavors/FlavorOptions.cs @@ -4,7 +4,7 @@ namespace Finch.Models; public class FlavorOptions { - public ConcurrentDictionary Providers { get; private set; } = new(); + public ConcurrentDictionary Providers { get; } = new(); public void Configure(Action> configure) where TEntity : class, ISupportsFlavors, new() { diff --git a/Finch/Models/Flavors/JsonFlavorVariantConverter.cs b/Finch/Models/Flavors/JsonFlavorVariantConverter.cs index 6defb701..a06a52a0 100644 --- a/Finch/Models/Flavors/JsonFlavorVariantConverter.cs +++ b/Finch/Models/Flavors/JsonFlavorVariantConverter.cs @@ -5,7 +5,7 @@ namespace Finch.Models; internal class JsonFlavorVariantConverter : JsonDiscriminatorConverter where T : class, ISupportsFlavors, new() { - protected FlavorProvider Provider { get; private set; } + protected FlavorProvider Provider { get; } Type _factoryType = typeof(JsonFlavorVariantConverterFactory); diff --git a/Finch/Mvc/FinchMvcModule.cs b/Finch/Mvc/FinchMvcModule.cs index 5b37dc8d..8ca9a33e 100644 --- a/Finch/Mvc/FinchMvcModule.cs +++ b/Finch/Mvc/FinchMvcModule.cs @@ -1,7 +1,4 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Mvc.RazorPages; -using Microsoft.AspNetCore.Routing; -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; namespace Finch.Mvc; diff --git a/Finch/Routing/RequestUrlResolver.cs b/Finch/Routing/RequestUrlResolver.cs index 44921121..31342f01 100644 --- a/Finch/Routing/RequestUrlResolver.cs +++ b/Finch/Routing/RequestUrlResolver.cs @@ -5,9 +5,9 @@ namespace Finch.Routing; public class RequestUrlResolver : IRequestUrlResolver { - protected IHttpContextAccessor HttpContextAccessor { get; private set; } + protected IHttpContextAccessor HttpContextAccessor { get; } - protected ILogger Logger { get; private set; } + protected ILogger Logger { get; } static string[] Protocols = new[] { "http://", "https://", "ftp://", "ftps://", "sftp://", "udp://" }; diff --git a/Finch/Utils/ObjectCopycat.cs b/Finch/Utils/ObjectCopycat.cs index c7d8ae57..a222ee45 100644 --- a/Finch/Utils/ObjectCopycat.cs +++ b/Finch/Utils/ObjectCopycat.cs @@ -10,7 +10,7 @@ public class ObjectCopycat static readonly Type STRING_TYPE = typeof(string); - static ConcurrentDictionary> PublicPropertiesPerType { get; set; } = new(); + static ConcurrentDictionary> PublicPropertiesPerType { get; } = new(); public static T Clone(T obj) diff --git a/Finch/Validation/FinchMergedValidator.cs b/Finch/Validation/FinchMergedValidator.cs index f1addb57..a5857378 100644 --- a/Finch/Validation/FinchMergedValidator.cs +++ b/Finch/Validation/FinchMergedValidator.cs @@ -6,7 +6,7 @@ namespace Finch.Validation; public class FinchMergedValidator : IFinchMergedValidator { - protected IEnumerable> Validators { get; private set; } + protected IEnumerable> Validators { get; } ConcurrentDictionary>> TypeCache = new();