Show / Hide Table of Contents

    Class MessageProcessingExtensions

    Provides extension helper methods relates to a message processing pipeline.

    Inheritance
    Object
    MessageProcessingExtensions
    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 static class MessageProcessingExtensions

    Fields

    ContextPropertyTokenFormat

    Regular expression used for matching tokens representing context property's names that need to be replaced with corresponding property's values. The token format is "<{Property Name}>".

    Declaration
    public static readonly Regex ContextPropertyTokenFormat
    Field Value
    Type Description
    Regex

    Methods

    ReplaceContextPropertyTokens(RoutingContextMessageProperty, String, Boolean)

    Finds all specially formatted context property names in the specified string and replaces them with context property values found in the provided routing context.

    Declaration
    public static string ReplaceContextPropertyTokens(RoutingContextMessageProperty routingContext, string value, bool removeUnresolvedTokens)
    Parameters
    Type Name Description
    RoutingContextMessageProperty routingContext

    Routing context message property to be used for extracting context properties.

    String value

    String value that may contain one or more tokens specifying context properties.

    Boolean removeUnresolvedTokens

    Flag indicating that tokens, for which context properties are not found, should be removed from the provided value. If False then tokens will be left in the value intact.

    Returns
    Type Description
    String

    Original value with tokens specifying the context property's names been replaced with property's values.

    ReplaceContextPropertyTokens(MessagePipelineContext, String)

    Finds all specially formatted context property names in the specified string and replaces them with context property values found in the provided message processing context.

    Declaration
    public static string ReplaceContextPropertyTokens(this MessagePipelineContext context, string value)
    Parameters
    Type Name Description
    MessagePipelineContext context

    Message processing pipeline context to be used for extracting context properties.

    String value

    String value that may contain one or more tokens specifying context properties.

    Returns
    Type Description
    String

    Original value with tokens specifying the context property's names been replaced with property's values.

    TryGetContextProperty(Message, String, out String)

    Retrieves a context property value from provided message. Non string value is converted to string.

    Declaration
    public static bool TryGetContextProperty(this Message message, string name, out string value)
    Parameters
    Type Name Description
    Message message

    Message being processed and to be used for extracting context property.

    String name

    Name of the context property to be retrieved.

    String value

    Value of the property.

    Returns
    Type Description
    Boolean

    Flag indicating that property has been found and its value has been extracted.

    TryGetContextProperty(MessageProperties, String, out String)

    Retrieves a context property value from provided context properties collection. Non string value is converted to string.

    Declaration
    public static bool TryGetContextProperty(this MessageProperties properties, string name, out string value)
    Parameters
    Type Name Description
    MessageProperties properties

    Context properties collection (not a message properties collection) to retrieve a value from.

    String name

    Name of the context property to be retrieved.

    String value

    Value of the property.

    Returns
    Type Description
    Boolean

    Flag indicating that property has been found and its value has been extracted.

    Back to top Nevatech Sentinet 6.5 Online Documentation