Table of Contents

Class RawMessage

Namespace
Silverback.Messaging.Messages
Assembly
Silverback.Integration.dll

Wraps a raw message Stream.

public class RawMessage
Inheritance
RawMessage
Derived
Inherited Members

Constructors

RawMessage(Stream?)

Initializes a new instance of the RawMessage class.

public RawMessage(Stream? content)

Parameters

content Stream

The message content.

Properties

Content

Gets the message content.

public Stream? Content { get; }

Property Value

Stream

Methods

FromByteArray(byte[]?)

Creates a new RawMessage instance from the specified content.

public static RawMessage FromByteArray(byte[]? content)

Parameters

content byte[]

The message content.

Returns

RawMessage

A RawMessage wrapping the specified content.

FromStream(Stream?)

Creates a new RawMessage instance from the specified content.

public static RawMessage FromStream(Stream? content)

Parameters

content Stream

The message content.

Returns

RawMessage

A RawMessage wrapping the specified content.

ToByteArray()

Returns the message content.

public byte[]? ToByteArray()

Returns

byte[]

The message content.

ToByteArrayAsync()

Returns the message content.

public ValueTask<byte[]?> ToByteArrayAsync()

Returns

ValueTask<byte[]>

The message content.

ToStream()

Returns the message content.

public Stream? ToStream()

Returns

Stream

The message content.

Operators

implicit operator byte[]?(RawMessage?)

Implicitly converts a RawMessage to a byte array.

public static implicit operator byte[]?(RawMessage? message)

Parameters

message RawMessage

The RawMessage.

Returns

byte[]

The message content.

implicit operator Stream?(RawMessage?)

Implicitly converts a RawMessage to a Stream.

public static implicit operator Stream?(RawMessage? message)

Parameters

message RawMessage

The RawMessage.

Returns

Stream

The message content.

implicit operator RawMessage(byte[]?)

Implicitly converts a byte array to a RawMessage.

public static implicit operator RawMessage(byte[]? content)

Parameters

content byte[]

The message content.

Returns

RawMessage

A RawMessage wrapping the specified content.

implicit operator RawMessage(Stream?)

Implicitly converts a Stream to a RawMessage.

public static implicit operator RawMessage(Stream? content)

Parameters

content Stream

The message content.

Returns

RawMessage

A RawMessage wrapping the specified content.