From e521e17ee8f73fceee3504fe2be16203de2161df Mon Sep 17 00:00:00 2001 From: David Driscoll Date: Sun, 30 Jun 2019 12:46:19 -0400 Subject: [PATCH] Updated base builders to be less strict with properties +semver:minor --- src/Conventions/ConventionBuilder.cs | 4 ++-- src/Conventions/ConventionContainerBuilder.cs | 14 ++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/Conventions/ConventionBuilder.cs b/src/Conventions/ConventionBuilder.cs index f7909bb54..df7602538 100644 --- a/src/Conventions/ConventionBuilder.cs +++ b/src/Conventions/ConventionBuilder.cs @@ -25,8 +25,8 @@ protected ConventionBuilder( IConventionScanner scanner, IAssemblyProvider assemblyProvider, IAssemblyCandidateFinder assemblyCandidateFinder, - IServiceProviderDictionary serviceProperties - ) : base(scanner, serviceProperties) + IDictionary properties + ) : base(scanner, properties) { AssemblyProvider = assemblyProvider ?? throw new ArgumentNullException(nameof(assemblyProvider)); AssemblyCandidateFinder = assemblyCandidateFinder ?? throw new ArgumentNullException(nameof(assemblyCandidateFinder)); diff --git a/src/Conventions/ConventionContainerBuilder.cs b/src/Conventions/ConventionContainerBuilder.cs index eb7468367..da5f8e8be 100644 --- a/src/Conventions/ConventionContainerBuilder.cs +++ b/src/Conventions/ConventionContainerBuilder.cs @@ -20,12 +20,12 @@ public abstract class ConventionContainerBuilder properties) { Scanner = scanner ?? throw new ArgumentNullException(nameof(scanner)); - ServiceProperties = serviceProperties ?? new ServiceProviderDictionary(); + Properties = properties ?? throw new ArgumentNullException(nameof(properties)); - if (!Properties.TryGetValue(typeof(IConventionScanner), out var _)) + if (!Properties.TryGetValue(typeof(IConventionScanner), out _)) Properties[typeof(IConventionScanner)] = Scanner; } @@ -44,13 +44,7 @@ public virtual object this[object item] /// A central location for sharing state between components during the convention building process. /// /// The properties. - public IServiceProviderDictionary ServiceProperties { get; } - - /// - /// A central location for sharing state between components during the convention building process. - /// - /// The properties. - public IDictionary Properties => ServiceProperties; + public IDictionary Properties { get; } /// /// Gets the scanner.