Show / Hide Table of Contents

    Class MessageSettings

    Defines a set of configuration properties for a message.

    Inheritance
    Object
    MessageSettings
    Implements
    IValidator
    IEquatable<MessageSettings>
    Inherited Members
    Object.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Nevatech.Vsb.Repository.Entities
    Assembly: Nevatech.Vsb.Repository.dll
    Syntax
    public class MessageSettings : IValidator, IEquatable<MessageSettings>
    Remarks

    Processing rules:

    1. Matching of the inbound request 1.1. HTTP method must match (if "*" is not used) 1.2. URI template path segments must match considering the default value AND list of permitted values 1.3. URI template query parameters must match the required parameters and their list of permitted values. Not required parameters with lists of permitted values must be matched if such parameters are passed in the request. 1.4. HTTP headers must match the required parameters and their list of permitted values. Not required headers with lists of permitted values must be matched if such headers are passed in the request. 1.5. Form and Body parameters are not matched, not validated, and variables are not assigned.

    2. Constructing of the outbound request 2.1. HTTP method is set to the outbound method or set to the inbound method, if outbound method is "*". 2.2. List of permitted values is not validated for outbound parameters. 2.3. If variable is not initialized for an outbound parameter: optional query parameters without default value are not added, required parameters are added with empty values. 2.4. Parameters defined without a variable (including required parameters) are added only if their default values are defined. 2.5. URI is build from the outbound URI template, inbound variables, and outbound default values.
      2.6. HTTP headers are built from inbound variables and outbound default values. 2.7. Form and Body parameters are ignored and the inbound message body is passed as is.

    Note that IExtensibleDataObject interface has been removed from this object to avoid problems with legacy object JSON serialization.

    Constructors

    MessageSettings()

    Initializes an empty instance.

    Declaration
    public MessageSettings()

    MessageSettings(MessageSettings, Boolean)

    Initializes new instance by copying properties from the provided message settings.

    Declaration
    public MessageSettings(MessageSettings settings, bool copyReferences = false)
    Parameters
    Type Name Description
    MessageSettings settings

    Message settings to copy properties from.

    Boolean copyReferences

    Flag indicating that references to inner objects and collections need to be copied. If false then deep copies of all inner objects and collections will be created.

    Properties

    ErrorMessage

    Gets the summary of validation errors.

    Declaration
    public string ErrorMessage { get; }
    Property Value
    Type Description
    String

    ExtensionData

    Gets or sets ExtensionDataObject that enables serialization roundtrips.

    Declaration
    public ExtensionDataObject ExtensionData { get; set; }
    Property Value
    Type Description
    ExtensionDataObject

    HttpMethod

    Gets or sets the HTTP request method name (like GET, POST, PUT, DELETE, etc). If property is not set or set to "*" than any HTTP method will be accepted and passed through.

    Declaration
    public string HttpMethod { get; set; }
    Property Value
    Type Description
    String

    Parameters

    Gets collection of request message parameters.

    Declaration
    public Collection<MessageParameter> Parameters { get; }
    Property Value
    Type Description
    Collection<MessageParameter>

    PreserveTrailingSlash

    Gets or sets the flag indicating whether trailing slash "/" characters should be ignored or distinguished.

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

    RequestMimeTypes

    Gets collection of MIME types that operation can consume. This overrides the list defined for the service version.

    Declaration
    public Collection<string> RequestMimeTypes { get; }
    Property Value
    Type Description
    Collection<String>

    ResponseMimeTypes

    Gets collection of MIME types that operation can produce. This overrides the list defined for the service version.

    Declaration
    public Collection<string> ResponseMimeTypes { get; }
    Property Value
    Type Description
    Collection<String>

    Responses

    Gets collection of possible responses as they are returned from executing this operation.

    Declaration
    public Collection<ResponseMessage> Responses { get; }
    Property Value
    Type Description
    Collection<ResponseMessage>

    UnknownQueryParameterAction

    Gets or sets the action that must be performed, if request URI contains parameter(s) not included in the template. Default is PassThrough.

    Declaration
    public UriParameterAction UnknownQueryParameterAction { get; set; }
    Property Value
    Type Description
    UriParameterAction

    UriTemplate

    Gets or sets the request URI template string used to match REST requests.

    Declaration
    public string UriTemplate { get; set; }
    Property Value
    Type Description
    String

    Methods

    CopyFrom(MessageSettings, Boolean)

    Populates this instance from the provided settings.

    Declaration
    public void CopyFrom(MessageSettings settings, bool copyReferences = false)
    Parameters
    Type Name Description
    MessageSettings settings

    Settings to copy properties from.

    Boolean copyReferences

    Flag indicating that references to inner objects and collections need to be copied. If false then deep copies of all inner objects and collections will be created.

    Equals(MessageSettings)

    Determines whether the specified object is equal to the current object.

    Declaration
    public bool Equals(MessageSettings other)
    Parameters
    Type Name Description
    MessageSettings other

    The object to compare with the current object.

    Returns
    Type Description
    Boolean

    True, if objects are equal. False, if objects are not equal.

    Equals(Object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The object to compare with the current object.

    Returns
    Type Description
    Boolean

    True, if objects are equal. False, if objects are not equal.

    Overrides
    Object.Equals(Object)

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    Hash code of the current instance.

    Overrides
    Object.GetHashCode()

    GetVariableNames(Boolean)

    Returns collection of variable names used in URI template and HTTP headers.

    Declaration
    public Collection<string> GetVariableNames(bool requiredOnly)
    Parameters
    Type Name Description
    Boolean requiredOnly

    Flag indicating that only variables without default values must be returned. If False than all variables must be returned.

    Returns
    Type Description
    Collection<String>

    Collection of variable names used in URI template and HTTP headers.

    Validate()

    Evaluates the state of this object.

    Declaration
    public bool Validate()
    Returns
    Type Description
    Boolean

    True if state is valid; otherwise, false.

    Validate(Boolean)

    Evaluates the state of this object.

    Declaration
    public bool Validate(bool isRestRequest)
    Parameters
    Type Name Description
    Boolean isRestRequest

    Flag indicating that settings belong to a request message of REST or ODATA service operation.

    Returns
    Type Description
    Boolean

    True if state is valid; otherwise, false.

    Implements

    IValidator
    System.IEquatable<T>
    Back to top Nevatech Sentinet 6.5 Online Documentation