Skip to main content

IntegrityContainer.RegisterFactory<TServiceType>(Func<TServiceType>) Method

Registers a delegate to resolve an instance of the specified type with a specified TServiceType key.

Namespace: DevExpress.Utils.IoC

Assembly: DevExpress.Data.v23.2.dll

NuGet Package: DevExpress.Data

Declaration

public FactoryRegistration RegisterFactory<TServiceType>(
    Func<TServiceType> factory
)

Parameters

Name Type Description
factory Func<TServiceType>

A function, specifying the type to resolve.

Type Parameters

Name
TServiceType

Returns

Type Description
FactoryRegistration

A FactoryRegistration object.

Remarks

The following example illustrates how to use this method.

integrityContainer.RegisterFactory<IFoobar>(() => Factory.Create());
See Also