Class AdapterProtocolJson
- Namespace
- MirrorPulse.Adapter.Sdk
- Assembly
- MirrorPulse.Adapter.Sdk.dll
Wire names are stable and independent of language-specific DTO names.
public static class AdapterProtocolJson
- Inheritance
-
AdapterProtocolJson
- Inherited Members
Methods
Decode<T>(ReadOnlySpan<byte>)
public static T Decode<T>(ReadOnlySpan<byte> bytes)
Parameters
bytesReadOnlySpan<byte>
Returns
- T
Type Parameters
T
Encode<T>(T)
public static byte[] Encode<T>(T value)
Parameters
valueT
Returns
- byte[]
Type Parameters
T
ReadAddress(JsonElement, int, string?)
Reading a v1 address is allowed only with an explicit single-root binding.
public static AdapterFileAddress ReadAddress(JsonElement payload, int protocolVersion, string? legacyRootKey = null)
Parameters
payloadJsonElementprotocolVersionintlegacyRootKeystring
Returns
ToElement<T>(T)
public static JsonElement ToElement<T>(T value)
Parameters
valueT
Returns
Type Parameters
T
ValidateMutation(AdapterOperationRequest, bool)
Validates the operation ID, address shapes, required destination and revision length.
public static void ValidateMutation(AdapterOperationRequest request, bool requiresDestination)
Parameters
requestAdapterOperationRequestrequiresDestinationbool
Remarks
The Worker must separately authorize the roots and enforce the requested conditions before any backend effect.