C# Class Rebel.Framework.Bootstrappers.Autofac.Modules.ConfigurationElementExtensions

Mostrar archivo Open project: RebelCMS/rebelcmsxu5

Public Methods

Method Description
ToParameter ( this element ) : ResolvedParameter

Converts a PersistenceReaderElement to a ResolvedParameter, meaning persistence repository types referenced in configuration by name can be injected into the constructor of the parent provider.

ResolvedParameter types allow for the deferred resolution of a type by using an IComponentContext to queue calls to resolve the instances, which would otherwise be tricky to do via chaining modules together

ToParameters ( this collection ) : IEnumerable

Converts the PersistenceReadWriterElement in a PersistenceReadWriterElementCollection to a ResolvedParameter, meaning persistence repository types referenced in configuration by name can be injected into the constructor of the parent provider.

ResolvedParameter types allow for the deferred resolution of a type by using an IComponentContext to queue calls to resolve the instances, which would otherwise be tricky to do via chaining modules together

Private Methods

Method Description
ResolveNamedPersistenceRepositoryProvider ( IComponentContext context, PersistenceReadWriterElement providerElement ) : object

Resolves the named persistence read-writer using an IComponentContext.

ResolveNamedPersistenceRepositoryProvider ( IComponentContext context, PersistenceReaderElement providerElement ) : object

Resolves the named persistence reader using an IComponentContext.

Method Details

ToParameter() public static method

Converts a PersistenceReaderElement to a ResolvedParameter, meaning persistence repository types referenced in configuration by name can be injected into the constructor of the parent provider.
ResolvedParameter types allow for the deferred resolution of a type by using an IComponentContext to queue calls to resolve the instances, which would otherwise be tricky to do via chaining modules together
public static ToParameter ( this element ) : ResolvedParameter
element this
return ResolvedParameter

ToParameters() public static method

Converts the PersistenceReadWriterElement in a PersistenceReadWriterElementCollection to a ResolvedParameter, meaning persistence repository types referenced in configuration by name can be injected into the constructor of the parent provider.
ResolvedParameter types allow for the deferred resolution of a type by using an IComponentContext to queue calls to resolve the instances, which would otherwise be tricky to do via chaining modules together
public static ToParameters ( this collection ) : IEnumerable
collection this
return IEnumerable