C# Class Thinktecture.ServiceModel.IoC.IocInstanceProvider

NOTE: only works with non-singleton instances.
Inheritance: IInstanceProvider
Afficher le fichier Open project: ChristianWeyer/Thinktecture.ServiceModel

Méthodes publiques

Méthode 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

Méthode Description
CreateUnityContainer ( string containerName ) : IServiceLocator

Method Details

GetInstance() public méthode

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.
Résultat object

GetInstance() public méthode

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.
Résultat object

IocInstanceProvider() public méthode

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

IocInstanceProvider() public méthode

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.
Résultat System

ReleaseInstance() public méthode

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.
Résultat void