Skip to main content

ContainerExtensions

Assembly: ServiceStack.Common.dll
View Source
Declaration
public static class ContainerExtensions

Methods

Resolve<T>(IResolver)

View Source
Declaration
public static T Resolve<T>(this IResolver container)
Returns

<T>

Parameters
TypeName
ServiceStack.Configuration.IResolvercontainer
Type Parameters
  • T

Resolve<T>(IContainer)

View Source
Declaration
public static T Resolve<T>(this IContainer container)
Returns

<T>

Parameters
TypeName
ServiceStack.IContainercontainer
Type Parameters
  • T

Exists<T>(IContainer)

View Source
Declaration
public static bool Exists<T>(this IContainer container)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.IContainercontainer
Type Parameters
  • T

AddTransient<TService>(IContainer)

View Source
Declaration
public static IContainer AddTransient<TService>(this IContainer container)
Returns

ServiceStack.IContainer

Parameters
TypeName
ServiceStack.IContainercontainer
Type Parameters
  • TService

AddTransient<TService>(IContainer, Func<TService>)

View Source
Declaration
public static IContainer AddTransient<TService>(this IContainer container, Func<TService> factory)
Returns

ServiceStack.IContainer

Parameters
TypeName
ServiceStack.IContainercontainer
System.Func<<TService>>factory
Type Parameters
  • TService

AddTransient<TService, TImpl>(IContainer)

View Source
Declaration
public static IContainer AddTransient<TService, TImpl>(this IContainer container)
where TImpl : TService
Returns

ServiceStack.IContainer

Parameters
TypeName
ServiceStack.IContainercontainer
Type Parameters
  • TService
  • TImpl

AddTransient(IContainer, Type)

View Source
Declaration
public static IContainer AddTransient(this IContainer container, Type type)
Returns

ServiceStack.IContainer

Parameters
TypeName
ServiceStack.IContainercontainer
System.Typetype

AddSingleton<TService>(IContainer)

View Source
Declaration
public static IContainer AddSingleton<TService>(this IContainer container)
Returns

ServiceStack.IContainer

Parameters
TypeName
ServiceStack.IContainercontainer
Type Parameters
  • TService

AddSingleton<TService>(IContainer, Func<TService>)

View Source
Declaration
public static IContainer AddSingleton<TService>(this IContainer container, Func<TService> factory)
Returns

ServiceStack.IContainer

Parameters
TypeName
ServiceStack.IContainercontainer
System.Func<<TService>>factory
Type Parameters
  • TService

AddSingleton<TService, TImpl>(IContainer)

View Source
Declaration
public static IContainer AddSingleton<TService, TImpl>(this IContainer container)
where TImpl : TService
Returns

ServiceStack.IContainer

Parameters
TypeName
ServiceStack.IContainercontainer
Type Parameters
  • TService
  • TImpl

AddSingleton(IContainer, Type)

View Source
Declaration
public static IContainer AddSingleton(this IContainer container, Type type)
Returns

ServiceStack.IContainer

Parameters
TypeName
ServiceStack.IContainercontainer
System.Typetype