Class WcfServiceInstanceProvider
Provides the capability to re-use the same service instance for each call invoked on the service.
Inheritance
System.Object
WcfServiceInstanceProvider
Namespace: Copper.Wcf
Assembly: Copper.Wcf.dll
Syntax
public class WcfServiceInstanceProvider : IInstanceProvider
Constructors
View SourceWcfServiceInstanceProvider(Object)
Initializes a new instance of the Wcf
Declaration
public WcfServiceInstanceProvider(object serviceInstance)
Parameters
Type | Name | Description |
---|---|---|
System. |
serviceInstance | The service instance. |
Methods
View SourceGetInstance(InstanceContext)
Returns a service object given the specified System.
Declaration
public object GetInstance(InstanceContext instanceContext)
Parameters
Type | Name | Description |
---|---|---|
Instance |
instanceContext | The current System. |
Returns
Type | Description |
---|---|
System. |
A user-defined service object. |
GetInstance(InstanceContext, Message)
Returns a service object given the specified System.
Declaration
public object GetInstance(InstanceContext instanceContext, Message message)
Parameters
Type | Name | Description |
---|---|---|
Instance |
instanceContext | The current System. |
Message | message | The message that triggered the creation of a service object. |
Returns
Type | Description |
---|---|
System. |
The service object. |
ReleaseInstance(InstanceContext, Object)
Called when an System.
Declaration
public void ReleaseInstance(InstanceContext instanceContext, object instance)
Parameters
Type | Name | Description |
---|---|---|
Instance |
instanceContext | The service's instance context. |
System. |
instance | The service object to be recycled. |