@@ -37,19 +37,19 @@ public virtual RepositoryInterceptorElementCollection Interceptors
3737 get => ( RepositoryInterceptorElementCollection ) this [ InterceptorsKey ] ;
3838 }
3939
40- [ ConfigurationProperty ( DefaultContextFactoryKey , IsRequired = false ) ]
40+ [ ConfigurationProperty ( DefaultContextFactoryKey , IsRequired = false , IsDefaultCollection = false ) ]
4141 public virtual RepositoryContextFactoryElement DefaultContextFactory
4242 {
4343 get => ( RepositoryContextFactoryElement ) this [ DefaultContextFactoryKey ] ;
4444 }
4545
46- [ ConfigurationProperty ( LoggingProviderKey , IsRequired = false ) ]
46+ [ ConfigurationProperty ( LoggingProviderKey , IsRequired = false , IsDefaultCollection = false ) ]
4747 public virtual LoggingProviderElement LoggingProvider
4848 {
4949 get => ( LoggingProviderElement ) this [ LoggingProviderKey ] ;
5050 }
5151
52- [ ConfigurationProperty ( CachingProviderKey , IsRequired = false ) ]
52+ [ ConfigurationProperty ( CachingProviderKey , IsRequired = false , IsDefaultCollection = false ) ]
5353 public virtual CachingProviderElement CachingProvider
5454 {
5555 get => ( CachingProviderElement ) this [ CachingProviderKey ] ;
@@ -145,7 +145,7 @@ public string ValueString
145145
146146 class ParameterCollection : ConfigurationElementCollection
147147 {
148- private const string ParameterKey = "parameter " ;
148+ private const string ParameterKey = "param " ;
149149
150150 public override ConfigurationElementCollectionType CollectionType
151151 {
@@ -168,10 +168,9 @@ protected override string ElementName
168168 }
169169 }
170170
171- abstract class TypedConfigurationElementBase < T > : ConfigurationElement
171+ abstract class TypedConfigurationElementBase < T > : ParameterCollection
172172 {
173173 private const string TypeKey = "type" ;
174- private const string ParametersKey = "parameters" ;
175174
176175 private Type _type ;
177176
@@ -203,21 +202,14 @@ public Type Type
203202 }
204203 }
205204
206- [ ConfigurationProperty ( ParametersKey , IsDefaultCollection = false ) ]
207- public ParameterCollection Parameters
208- {
209- get { return ( ParameterCollection ) this [ ParametersKey ] ; }
210- }
211-
212205 public virtual T GetTypedValue ( )
213206 {
214207 var type = Type ;
215208
216209 if ( type == null )
217210 return default ( T ) ;
218211
219- var keyValues = Parameters
220- . Cast < ParameterElement > ( )
212+ var keyValues = this . Cast < ParameterElement > ( )
221213 . ToDictionary ( x => x . Name , x => x . ValueString ) ;
222214
223215 if ( ! keyValues . Any ( ) )
0 commit comments