46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
using MxGateway.Contracts.Proto;
|
|
|
|
namespace MxGateway.Client;
|
|
|
|
public class MxGatewayException : Exception
|
|
{
|
|
public MxGatewayException(string message)
|
|
: base(message)
|
|
{
|
|
Statuses = [];
|
|
}
|
|
|
|
public MxGatewayException(string message, Exception? innerException)
|
|
: base(message, innerException)
|
|
{
|
|
Statuses = [];
|
|
}
|
|
|
|
public MxGatewayException(
|
|
string message,
|
|
string? sessionId,
|
|
string? correlationId,
|
|
ProtocolStatus? protocolStatus,
|
|
int? hResult,
|
|
IReadOnlyList<MxStatusProxy> statuses,
|
|
Exception? innerException = null)
|
|
: base(message, innerException)
|
|
{
|
|
SessionId = sessionId;
|
|
CorrelationId = correlationId;
|
|
ProtocolStatus = protocolStatus;
|
|
HResultCode = hResult;
|
|
Statuses = statuses;
|
|
}
|
|
|
|
public string? SessionId { get; }
|
|
|
|
public string? CorrelationId { get; }
|
|
|
|
public ProtocolStatus? ProtocolStatus { get; }
|
|
|
|
public int? HResultCode { get; }
|
|
|
|
public IReadOnlyList<MxStatusProxy> Statuses { get; }
|
|
}
|