C# Класс Thinktecture.ServiceModel.IoC.IocInstanceProvider

NOTE: only works with non-singleton instances.
Наследование: IInstanceProvider
Показать файл Открыть проект

Открытые методы

Метод Описание
GetInstance ( System.ServiceModel.InstanceContext instanceContext ) : object

Returns a service object given the specified T:System.ServiceModel.InstanceContext object.

GetInstance ( System.ServiceModel.InstanceContext instanceContext, System message ) : object

Returns a service object given the specified T:System.ServiceModel.InstanceContext object.

IocInstanceProvider ( Type serviceType ) : System

Initializes a new instance of the IocInstanceProvider class.

IocInstanceProvider ( Type serviceType, string containerName ) : System

Initializes a new instance of the IocInstanceProvider class.

ReleaseInstance ( System.ServiceModel.InstanceContext instanceContext, object instance ) : void

Called when an T:System.ServiceModel.InstanceContext object recycles a service object.

Приватные методы

Метод Описание
CreateUnityContainer ( string containerName ) : IServiceLocator

Описание методов

GetInstance() публичный Метод

Returns a service object given the specified T:System.ServiceModel.InstanceContext object.
public GetInstance ( System.ServiceModel.InstanceContext instanceContext ) : object
instanceContext System.ServiceModel.InstanceContext The current object.
Результат object

GetInstance() публичный Метод

Returns a service object given the specified T:System.ServiceModel.InstanceContext object.
public GetInstance ( System.ServiceModel.InstanceContext instanceContext, System message ) : object
instanceContext System.ServiceModel.InstanceContext The current object.
message System The message that triggered the creation of a service object.
Результат object

IocInstanceProvider() публичный Метод

Initializes a new instance of the IocInstanceProvider class.
public IocInstanceProvider ( Type serviceType ) : System
serviceType System.Type Type of the service.
Результат System

IocInstanceProvider() публичный Метод

Initializes a new instance of the IocInstanceProvider class.
public IocInstanceProvider ( Type serviceType, string containerName ) : System
serviceType System.Type Type of the service.
containerName string Name of the container.
Результат System

ReleaseInstance() публичный Метод

Called when an T:System.ServiceModel.InstanceContext object recycles a service object.
public ReleaseInstance ( System.ServiceModel.InstanceContext instanceContext, object instance ) : void
instanceContext System.ServiceModel.InstanceContext The service's instance context.
instance object The service object to be recycled.
Результат void