ContainerTypeExtensions
Assembly: ServiceStack.dll
View Source
Declaration
public static class ContainerTypeExtensions
Methods
RegisterAutoWiredType(Container, Type, Type, ReuseScope)
Registers the type in the IoC container and adds auto-wiring to the specified type.
View Source
Declaration
public static void RegisterAutoWiredType(this Container container, Type serviceType, Type inFunqAsType, ReuseScope scope = ReuseScope.None)
Parameters
Type | Name |
---|---|
Funq.Container | container |
System.Type | serviceType |
System.Type | inFunqAsType |
Funq.ReuseScope | scope |
RegisterAutoWiredType(Container, String, Type, Type, ReuseScope)
Registers a named instance of type in the IoC container and adds auto-wiring to the specified type.
View Source
Declaration
public static void RegisterAutoWiredType(this Container container, string name, Type serviceType, Type inFunqAsType, ReuseScope scope = ReuseScope.None)
Parameters
Type | Name |
---|---|
Funq.Container | container |
System.String | name |
System.Type | serviceType |
System.Type | inFunqAsType |
Funq.ReuseScope | scope |
RegisterAutoWiredType(Container, Type, ReuseScope)
Registers the type in the IoC container and adds auto-wiring to the specified type. The reuse scope is set to none (transient).
View Source
Declaration
public static void RegisterAutoWiredType(this Container container, Type serviceType, ReuseScope scope = ReuseScope.None)
Parameters
Type | Name |
---|---|
Funq.Container | container |
System.Type | serviceType |
Funq.ReuseScope | scope |
RegisterAutoWiredType(Container, String, Type, ReuseScope)
Registers the type in the IoC container and adds auto-wiring to the specified type. The reuse scope is set to none (transient).
View Source
Declaration
public static void RegisterAutoWiredType(this Container container, string name, Type serviceType, ReuseScope scope = ReuseScope.None)
Parameters
Type | Name |
---|---|
Funq.Container | container |
System.String | name |
System.Type | serviceType |
Funq.ReuseScope | scope |
RegisterAutoWiredTypes(Container, IEnumerable<Type>, ReuseScope)
Registers the types in the IoC container and adds auto-wiring to the specified types. The reuse scope is set to none (transient).
View Source
Declaration
public static void RegisterAutoWiredTypes(this Container container, IEnumerable<Type> serviceTypes, ReuseScope scope = ReuseScope.None)
Parameters
Type | Name |
---|---|
Funq.Container | container |
System.Collections.Generic.IEnumerable<System.Type> | serviceTypes |
Funq.ReuseScope | scope |
Register(Container, Object, Type)
Register a singleton instance as a runtime type
View Source
Declaration
public static Container Register(this Container container, object instance, Type asType)
Returns
Funq.Container
Parameters
Type | Name |
---|---|
Funq.Container | container |
System.Object | instance |
System.Type | asType |