using ZB.MOM.WW.MxGateway.Contracts.Proto; namespace ZB.MOM.WW.MxGateway.Client; /// /// Exception thrown when the gateway returns a protocol-OK reply that carries neither the /// expected typed payload nor an int32 return_value, so the client cannot resolve the /// operation result. This replaces the historical that a /// blind reply.ReturnValue.Int32Value fallback would throw. /// public sealed class MxGatewayMalformedReplyException : MxGatewayException { /// Initializes a new instance with the given message. /// The error message describing the malformed reply. public MxGatewayMalformedReplyException(string message) : base(message) { } /// Initializes a new instance with full diagnostic context. /// The error message describing the malformed reply. /// The session ID, if available. /// The correlation ID for tracing, if available. /// The protocol status details, if available. /// The HResult code, if available. /// The MXAccess statuses, if available. /// The underlying exception, if any. public MxGatewayMalformedReplyException( string message, string? sessionId = null, string? correlationId = null, ProtocolStatus? protocolStatus = null, int? hResult = null, IReadOnlyList? statuses = null, Exception? innerException = null) : base( message, sessionId, correlationId, protocolStatus, hResult, statuses ?? [], innerException) { } }