Show / Hide Table of Contents

    Class RawMessage

    Wraps a raw message Stream.

    Inheritance
    object
    RawMessage
    RawMessage<T>
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Silverback.Messaging.Messages
    Assembly: Silverback.Integration.dll
    Syntax
    public class RawMessage

    Constructors

    RawMessage(Stream?)

    Initializes a new instance of the RawMessage class.

    Declaration
    public RawMessage(Stream? content)
    Parameters
    Type Name Description
    Stream content

    The message content.

    Properties

    Content

    Gets the message content.

    Declaration
    public Stream? Content { get; }
    Property Value
    Type Description
    Stream

    Methods

    FromByteArray(byte[]?)

    Creates a new RawMessage instance from the specified content.

    Declaration
    public static RawMessage FromByteArray(byte[]? content)
    Parameters
    Type Name Description
    byte[] content

    The message content.

    Returns
    Type Description
    RawMessage

    A RawMessage wrapping the specified content.

    FromStream(Stream?)

    Creates a new RawMessage instance from the specified content.

    Declaration
    public static RawMessage FromStream(Stream? content)
    Parameters
    Type Name Description
    Stream content

    The message content.

    Returns
    Type Description
    RawMessage

    A RawMessage wrapping the specified content.

    ToByteArray()

    Returns the message content.

    Declaration
    public byte[]? ToByteArray()
    Returns
    Type Description
    byte[]

    The message content.

    ToByteArrayAsync()

    Returns the message content.

    Declaration
    public ValueTask<byte[]?> ToByteArrayAsync()
    Returns
    Type Description
    ValueTask<byte[]>

    The message content.

    ToStream()

    Returns the message content.

    Declaration
    public Stream? ToStream()
    Returns
    Type Description
    Stream

    The message content.

    Operators

    implicit operator byte[]?(RawMessage?)

    Implicitly converts a RawMessage to a byte array.

    Declaration
    public static implicit operator byte[]?(RawMessage? message)
    Parameters
    Type Name Description
    RawMessage message

    The RawMessage.

    Returns
    Type Description
    byte[]

    The message content.

    implicit operator Stream?(RawMessage?)

    Implicitly converts a RawMessage to a Stream.

    Declaration
    public static implicit operator Stream?(RawMessage? message)
    Parameters
    Type Name Description
    RawMessage message

    The RawMessage.

    Returns
    Type Description
    Stream

    The message content.

    implicit operator RawMessage(byte[]?)

    Implicitly converts a byte array to a RawMessage.

    Declaration
    public static implicit operator RawMessage(byte[]? content)
    Parameters
    Type Name Description
    byte[] content

    The message content.

    Returns
    Type Description
    RawMessage

    A RawMessage wrapping the specified content.

    implicit operator RawMessage(Stream?)

    Implicitly converts a Stream to a RawMessage.

    Declaration
    public static implicit operator RawMessage(Stream? content)
    Parameters
    Type Name Description
    Stream content

    The message content.

    Returns
    Type Description
    RawMessage

    A RawMessage wrapping the specified content.

    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini