Skip to main content

SimpleContainer

Assembly: ServiceStack.Common.dll​
View Source​
Declaration
public class SimpleContainer : IContainer, IResolver

Properties​

IgnoreTypesNamed​

View Source​
Declaration
public HashSet<string> IgnoreTypesNamed { get; }

Fields​

InstanceCache​

View Source​
Declaration
protected readonly ConcurrentDictionary<Type, object> InstanceCache

Factory​

View Source​
Declaration
protected readonly ConcurrentDictionary<Type, Func<object>> Factory

Methods​

Resolve(Type)​

View Source​
Declaration
public object Resolve(Type type)
Returns​

System.Object

Parameters​
TypeName
System.Typetype

Exists(Type)​

View Source​
Declaration
public bool Exists(Type type)
Returns​

System.Boolean

Parameters​
TypeName
System.Typetype

RequiredResolve(Type, Type)​

View Source​
Declaration
public object RequiredResolve(Type type, Type ownerType)
Returns​

System.Object

Parameters​
TypeName
System.Typetype
System.TypeownerType

AddSingleton(Type, Func<Object>)​

View Source​
Declaration
public IContainer AddSingleton(Type type, Func<object> factory)
Returns​

ServiceStack.IContainer

Parameters​
TypeName
System.Typetype
System.Func<System.Object>factory

AddTransient(Type, Func<Object>)​

View Source​
Declaration
public IContainer AddTransient(Type type, Func<object> factory)
Returns​

ServiceStack.IContainer

Parameters​
TypeName
System.Typetype
System.Func<System.Object>factory

TryResolve<T>()​

View Source​
Declaration
public T TryResolve<T>()
Returns​

<T>

Type Parameters​
  • T

IncludeProperty(PropertyInfo)​

View Source​
Declaration
protected virtual bool IncludeProperty(PropertyInfo pi)
Returns​

System.Boolean

Parameters​
TypeName
System.Reflection.PropertyInfopi

ResolveBestConstructor(Type)​

View Source​
Declaration
protected virtual ConstructorInfo ResolveBestConstructor(Type type)
Returns​

System.Reflection.ConstructorInfo

Parameters​
TypeName
System.Typetype

CreateFactory(Type)​

View Source​
Declaration
public Func<object> CreateFactory(Type type)
Returns​

System.Func<System.Object>

Parameters​
TypeName
System.Typetype

Dispose()​

View Source​
Declaration
public void Dispose()

Implements​