Class BinaryMessageSerializer
- Namespace
- Silverback.Messaging.BinaryMessages
- Assembly
- Silverback.Integration.dll
Handles the IBinaryMessage. It's not really a serializer, since the raw binary content is transmitted as-is.
public sealed class BinaryMessageSerializer : IMessageSerializer, IEquatable<BinaryMessageSerializer>
- Inheritance
-
BinaryMessageSerializer
- Implements
- Inherited Members
Constructors
BinaryMessageSerializer()
public BinaryMessageSerializer()
Methods
Equals(BinaryMessageSerializer?)
public bool Equals(BinaryMessageSerializer? other)
Parameters
otherBinaryMessageSerializer
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
SerializeAsync(object?, MessageHeaderCollection, ProducerEndpoint)
Serializes the specified message object into a byte array.
public ValueTask<Stream?> SerializeAsync(object? message, MessageHeaderCollection headers, ProducerEndpoint endpoint)
Parameters
messageobjectThe message object to be serialized.
headersMessageHeaderCollectionThe message headers collection.
endpointProducerEndpointThe endpoint.
Returns
- ValueTask<Stream>
A Task<TResult> representing the asynchronous operation. The task result contains the Stream with the serialized message.