Show / Hide Table of Contents

    Class OperationContext

    Provides access to the execution context of a service method.

    Inheritance
    System.Object
    OperationContext
    Implements
    System.IDisposable
    Namespace: Copper.Common.Context
    Assembly: Copper.Common.dll
    Syntax
    public sealed class OperationContext : IDisposable

    Constructors

    View Source

    OperationContext(MessageHeaders)

    Initializes a new instance of the OperationContext class.

    Declaration
    public OperationContext(MessageHeaders incomingMessageHeaders)
    Parameters
    Type Name Description
    MessageHeaders incomingMessageHeaders

    The existing incoming message headers.

    View Source

    OperationContext(MessageHeaders, MessageHeaders)

    Initializes a new instance of the OperationContext class.

    Declaration
    public OperationContext(MessageHeaders incomingMessageHeaders = null, MessageHeaders outgoingMessageHeaders = null)
    Parameters
    Type Name Description
    MessageHeaders incomingMessageHeaders

    The existing incoming message headers.

    MessageHeaders outgoingMessageHeaders

    The existing outgoing message headers.

    Properties

    View Source

    Current

    Gets the execution context for the current thread.

    Declaration
    public static OperationContext Current { get; }
    Property Value
    Type Description
    OperationContext

    The OperationContext that represents the messaging and execution context of the current method.

    View Source

    IncomingMessageHeaders

    Gets the incoming message headers for the OperationContext.

    Declaration
    public MessageHeaders IncomingMessageHeaders { get; }
    Property Value
    Type Description
    MessageHeaders

    A object that contains the incoming message headers.

    View Source

    OutgoingMessageHeaders

    Gets the outgoing message headers for the active OperationContext.

    Declaration
    public MessageHeaders OutgoingMessageHeaders { get; }
    Property Value
    Type Description
    MessageHeaders

    A object that contains outbound message headers for the active OperationContext.

    Methods

    View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()

    Implements

    System.IDisposable
    • View Source
    Back to top Generated by DocFX