C# Class Griffin.Container.Wcf.ServiceLocatorInstanceProvider

Create instances using a service locator
Will also add a child container for scoped services and their sdependencies.
Inheritance: IInstanceProvider
Exibir arquivo Open project: jgauffin/Griffin.Container

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, Message message ) : object

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

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

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

ServiceLocatorInstanceProvider ( IParentContainer container, Type contractType ) : System

Initializes a new instance of the ServiceLocatorInstanceProvider class.

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, Message message ) : object
instanceContext System.ServiceModel.InstanceContext The current object.
message Message The message that triggered the creation of a service object.
return object

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

ServiceLocatorInstanceProvider() public method

Initializes a new instance of the ServiceLocatorInstanceProvider class.
public ServiceLocatorInstanceProvider ( IParentContainer container, Type contractType ) : System
container IParentContainer The container.
contractType System.Type
return System