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
serializerICarrotSerializerThe CarrotMQ serializer.
payloadstringThe payload to be deserialized.
Returns
- T
The deserialized object of type
T.
Type Parameters
TThe type into which the payload is deserialized.
Exceptions
- CarrotSerializerException
Thrown when the payload is null, empty, or the deserialization process fails.