Skip to main content

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
TypeName
Funq.Containercontainer
System.TypeserviceType
System.TypeinFunqAsType
Funq.ReuseScopescope

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
TypeName
Funq.Containercontainer
System.Stringname
System.TypeserviceType
System.TypeinFunqAsType
Funq.ReuseScopescope

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
TypeName
Funq.Containercontainer
System.TypeserviceType
Funq.ReuseScopescope

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
TypeName
Funq.Containercontainer
System.Stringname
System.TypeserviceType
Funq.ReuseScopescope

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
TypeName
Funq.Containercontainer
System.Collections.Generic.IEnumerable<System.Type>serviceTypes
Funq.ReuseScopescope

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
TypeName
Funq.Containercontainer
System.Objectinstance
System.TypeasType