Show / Hide Table of Contents

    Class MessagePipelineContext

    Provides the intercepted message and other relevant data that a component needs to analyze and modify a message in a message pipeline.

    Inheritance
    Object
    MessagePipelineContext
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Nevatech.Vsb.Repository.Processing
    Assembly: Nevatech.Vsb.Repository.dll
    Syntax
    public sealed class MessagePipelineContext

    Constructors

    MessagePipelineContext(Message, MessageFlow, RoutingEndpointDefinition, ServiceConfiguration)

    Initializes a new instance from the provided message.

    Declaration
    public MessagePipelineContext(Message message, MessageFlow flow, RoutingEndpointDefinition endpoint, ServiceConfiguration configuration)
    Parameters
    Type Name Description
    Message message

    Message to be initialized from.

    MessageFlow flow

    Message interception point.

    RoutingEndpointDefinition endpoint

    Description of the endpoint where message is intercepted.

    ServiceConfiguration configuration

    Runtime configuration of the current service.

    Remarks

    Constructor is made public for testing purposes.

    Properties

    Configuration

    Gets the full runtime configuration of the current service.

    Declaration
    public ServiceConfiguration Configuration { get; }
    Property Value
    Type Description
    ServiceConfiguration

    Endpoint

    Gets the description of the endpoint where message is intercepted.

    Declaration
    public RoutingEndpointDefinition Endpoint { get; }
    Property Value
    Type Description
    RoutingEndpointDefinition

    Flow

    Gets the message interception point.

    Declaration
    public MessageFlow Flow { get; }
    Property Value
    Type Description
    MessageFlow

    IsOutbound

    Gets flag indicating that message was intercepted in an outbound endpoint.

    Declaration
    public bool IsOutbound { get; }
    Property Value
    Type Description
    Boolean

    IsRequest

    Gets flag indicating that intercepted message is a request message.

    Declaration
    public bool IsRequest { get; }
    Property Value
    Type Description
    Boolean

    Message

    Gets or sets the message to be inspected and possibly modified.

    Declaration
    public Message Message { get; set; }
    Property Value
    Type Description
    Message

    RoutingContext

    Gets routing context stored in the message being processed.

    Declaration
    public RoutingContextMessageProperty RoutingContext { get; }
    Property Value
    Type Description
    RoutingContextMessageProperty

    TraceWriter

    Gets the trace writer to be used for recording pipeline execution.

    Declaration
    public ITraceWriter TraceWriter { get; }
    Property Value
    Type Description
    ITraceWriter

    Methods

    GetMessageBodyContent(Boolean)

    Extracts the Message body content into a string taking care about empty messages, read messages, and binary encoded messages.

    Declaration
    public string GetMessageBodyContent(bool preserveOriginalMessage)
    Parameters
    Type Name Description
    Boolean preserveOriginalMessage

    Flag indicating that original message must be preserved (left in Created state) after reading. This affectively requires creating a buffered copy, reading it, and then re-creating the original message.

    Returns
    Type Description
    String

    The message body content (starts from an element inside <Body /> element in SOAP message).

    SetMessageBodyContent(String)

    Creates new message with the specified content which is based on the original message and assigns it to the Message property.

    Declaration
    public void SetMessageBodyContent(string content)
    Parameters
    Type Name Description
    String content

    Content to be used for the new message (starts from an element inside <Body /> element in SOAP message).

    SetMessageBodyContent(XmlReader)

    Creates new message with the specified XML content which is based on the original message and assigns it to the Message property.

    Declaration
    public void SetMessageBodyContent(XmlReader content)
    Parameters
    Type Name Description
    XmlReader content

    Content to be used for the new message (starts from an element inside <Body /> element in SOAP message).

    Extension Methods

    MessageProcessingExtensions.ReplaceContextPropertyTokens(MessagePipelineContext, String)
    Back to top Nevatech Sentinet 6.5 Online Documentation