=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -10,6 +10,7 @@ namespace adas_core.Infrastructure.Utils;
|
||||
/// <remarks>
|
||||
/// This class serves as the RabbitMQ-specific concrete realization of the <see cref="IErrorMessageSerializer"/> contract.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=5b2b904 -->
|
||||
public class RabbitIErrorMessageSerializer : IErrorMessageSerializer
|
||||
{
|
||||
/// <summary>
|
||||
@@ -18,6 +19,7 @@ public class RabbitIErrorMessageSerializer : IErrorMessageSerializer
|
||||
/// </summary>
|
||||
/// <param name="messageBody">The JSON-encoded string to unescape and convert.</param>
|
||||
/// <returns>A UTF-8 encoded byte array of the unescaped string, or <c>null</c> if the deserialized value is <c>null</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=2d425b0 body=db8f7f7 -->
|
||||
public byte[]? Deserialize(string messageBody)
|
||||
{
|
||||
var unescapedJsonString = JsonConvert.DeserializeObject<string>(messageBody);
|
||||
@@ -30,6 +32,7 @@ public class RabbitIErrorMessageSerializer : IErrorMessageSerializer
|
||||
/// </summary>
|
||||
/// <param name="messageBody">The raw byte array representing the message body to be deserialized.</param>
|
||||
/// <returns>The deserialized JSON string if successful; otherwise, the raw UTF-8 decoded string. Returns <see langword="null"/> if the deserialized JSON value is null.</returns>
|
||||
/// <!-- aidoc:v1 sig=7a0ebce body=0ec9d3f -->
|
||||
public string? Serialize(byte[] messageBody)
|
||||
{
|
||||
var stringifiedMsgBody = Encoding.UTF8.GetString(messageBody);
|
||||
|
||||
Reference in New Issue
Block a user