C# Class LinFu.IoC.FactoryStorageExtensions

An extension class that adds a few helper methods to the IFactoryStorage interface.
ファイルを表示 Open project: philiplaureano/LinFu

Public Methods

Method Description
AddFactory ( this storage, string serviceName, Type serviceType, IEnumerable additionalParameterTypes, IFactory factory ) : void

Adds a factory to the current IFactoryStorage instance.

ContainsFactory ( this storage, string serviceName, Type serviceType, IEnumerable additionalParameterTypes ) : bool

Determines whether or not a factory exists in storage.

GetFactory ( this storage, string serviceName, Type serviceType, IEnumerable additionalParameterTypes ) : IFactory

Determines which factories should be used for a particular service request.

GetFactory ( this storage, string serviceName, Type serviceType, IEnumerable additionalParameters ) : IFactory

Determines which factories should be used for a particular service request.

Method Details

AddFactory() public static method

Adds a factory to the current IFactoryStorage instance.
public static AddFactory ( this storage, string serviceName, Type serviceType, IEnumerable additionalParameterTypes, IFactory factory ) : void
storage this The object that will store the target factory.
serviceName string The name that will be associated with the target factory.
serviceType System.Type The service type that the factory will be able to create.
additionalParameterTypes IEnumerable The list of additional parameters that this factory type will support.
factory IFactory The instance that will create the object instance.
return void

ContainsFactory() public static method

Determines whether or not a factory exists in storage.
public static ContainsFactory ( this storage, string serviceName, Type serviceType, IEnumerable additionalParameterTypes ) : bool
storage this The object that holds the target factory.
serviceName string The name that will be associated with the target factory.
serviceType System.Type The service type that the factory will be able to create.
additionalParameterTypes IEnumerable The list of additional parameters that this factory type will support.
return bool

GetFactory() public static method

Determines which factories should be used for a particular service request.
public static GetFactory ( this storage, string serviceName, Type serviceType, IEnumerable additionalParameterTypes ) : IFactory
storage this The object that holds the target factory.
serviceName string The name that will be associated with the target factory.
serviceType System.Type The service type that the factory will be able to create.
additionalParameterTypes IEnumerable The list of additional parameters that this factory type will support.
return IFactory

GetFactory() public static method

Determines which factories should be used for a particular service request.
public static GetFactory ( this storage, string serviceName, Type serviceType, IEnumerable additionalParameters ) : IFactory
storage this The object that holds the target factory.
serviceName string The name that will be associated with the target factory.
serviceType System.Type The service type that the factory will be able to create.
additionalParameters IEnumerable The list of additional parameter values that this factory type will use to instantiate the service.
return IFactory