Show / Hide Table of Contents

    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 Source

    WcfServiceInstanceProvider(Object)

    Initializes a new instance of the WcfServiceInstanceProvider class.

    Declaration
    public WcfServiceInstanceProvider(object serviceInstance)
    Parameters
    Type Name Description
    System.Object serviceInstance

    The service instance.

    Methods

    View Source

    GetInstance(InstanceContext)

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

    Declaration
    public object GetInstance(InstanceContext instanceContext)
    Parameters
    Type Name Description
    InstanceContext instanceContext

    The current System.ServiceModel.InstanceContext object.

    Returns
    Type Description
    System.Object

    A user-defined service object.

    View Source

    GetInstance(InstanceContext, Message)

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

    Declaration
    public object GetInstance(InstanceContext instanceContext, Message message)
    Parameters
    Type Name Description
    InstanceContext instanceContext

    The current System.ServiceModel.InstanceContext object.

    Message message

    The message that triggered the creation of a service object.

    Returns
    Type Description
    System.Object

    The service object.

    View Source

    ReleaseInstance(InstanceContext, Object)

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

    Declaration
    public void ReleaseInstance(InstanceContext instanceContext, object instance)
    Parameters
    Type Name Description
    InstanceContext instanceContext

    The service's instance context.

    System.Object instance

    The service object to be recycled.

    • View Source
    Back to top Generated by DocFX