Show / Hide Table of Contents

    Class GenericContext<T>

    Provides out-of-band context between clients and services.

    Inheritance
    System.Object
    GenericContext<T>
    Namespace: Copper.Common.Context
    Assembly: Copper.Common.dll
    Syntax
    [Serializable]
    public class GenericContext<T>
    Type Parameters
    Name Description
    T

    The context type.

    Constructors

    View Source

    GenericContext()

    Initializes a new instance of the GenericContext<T> class.

    Declaration
    public GenericContext()
    View Source

    GenericContext(T)

    Initializes a new instance of the GenericContext<T> class.

    Declaration
    public GenericContext(T value)
    Parameters
    Type Name Description
    T value

    The value of the out-of-band context.

    Fields

    View Source

    Value

    The value of the out-of-band context.

    Declaration
    public readonly T Value
    Field Value
    Type Description
    T

    Properties

    View Source

    Current

    Gets or sets the current out-of-band-context.

    Declaration
    public static GenericContext<T> Current { get; set; }
    Property Value
    Type Description
    GenericContext<T>

    The current out-of-band context.

    Exceptions
    Type Condition
    System.InvalidOperationException

    A header with name " + _typeName + " and namespace " + _typeNamespace + " already exists in the message.

    View Source

    Outgoing

    Gets the outgoing out-of-band context.

    Declaration
    public static GenericContext<T> Outgoing { get; }
    Property Value
    Type Description
    GenericContext<T>

    The outgoing out-of-band-context or null if it has not been set.

    Methods

    View Source

    GetSetValue()

    Gets the outgoing out-of-band context.

    Declaration
    public static GenericContext<T> GetSetValue()
    Returns
    Type Description
    GenericContext<T>

    The outgoing out-of-band context or null if it has not been set.

    View Source

    IsSet()

    Determines whether the outgoing out-of-band context is set.

    Declaration
    public static bool IsSet()
    Returns
    Type Description
    System.Boolean

    true if the outgoing out-of-band context is set; otherwise, false.

    View Source

    SetOrUpdate(GenericContext<T>)

    Sets or updates the outgoing out-of-band context with the specified value.

    Declaration
    public static void SetOrUpdate(GenericContext<T> genericContext)
    Parameters
    Type Name Description
    GenericContext<T> genericContext

    The out-of-band context.

    • View Source
    Back to top Generated by DocFX