Table of Contents

Class CarrotSerializerExtensions

Namespace
CarrotMQ.Core.Serialization
Assembly
CarrotMQ.Core.dll

Extension methods for the ICarrotSerializer interface.

public static class CarrotSerializerExtensions
Inheritance
CarrotSerializerExtensions
Inherited Members

Methods

DeserializeWithNullCheck<T>(ICarrotSerializer, string?)

Deserializes the specified payload using the provided serializer and performs null checks.

public static T DeserializeWithNullCheck<T>(this ICarrotSerializer serializer, string? payload)

Parameters

serializer ICarrotSerializer

The CarrotMQ serializer.

payload string

The payload to be deserialized.

Returns

T

The deserialized object of type T.

Type Parameters

T

The type into which the payload is deserialized.

Exceptions

CarrotSerializerException

Thrown when the payload is null, empty, or the deserialization process fails.