C# Class Thinktecture.ServiceModel.IoC.IocInstanceProvider

NOTE: only works with non-singleton instances.
Inheritance: IInstanceProvider
Exibir arquivo Open project: ChristianWeyer/Thinktecture.ServiceModel

Public Methods

Method Description
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.

Private Methods

Method Description
CreateUnityContainer ( string containerName ) : IServiceLocator

Method Details

GetInstance() public method

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.
return object

GetInstance() public method

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.
return object

IocInstanceProvider() public method

Initializes a new instance of the IocInstanceProvider class.
public IocInstanceProvider ( Type serviceType ) : System
serviceType System.Type Type of the service.
return System

IocInstanceProvider() public method

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.
return System

ReleaseInstance() public method

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.
return void