Table of Contents

Class FaultMessage

Namespace
AnyProtocol.Abstraction
Assembly
AnyProtocol.Abstraction.dll

Contains a serialized fault returned to a AnyProtocol caller.

public sealed record FaultMessage : IEquatable<FaultMessage>
Inheritance
FaultMessage
Implements
Inherited Members

Constructors

FaultMessage(string, string, string?, bool, IReadOnlyList<FaultDetail>?)

Contains a serialized fault returned to a AnyProtocol caller.

public FaultMessage(string Code, string Message, string? ExceptionType = null, bool Retryable = false, IReadOnlyList<FaultDetail>? Details = null)

Parameters

Code string

The machine-readable code.

Message string

The message payload or description.

ExceptionType string

The optional runtime exception type.

Retryable bool

true if the caller may safely retry the operation; otherwise, false.

Details IReadOnlyList<FaultDetail>

Optional structured details that further describe the result.

Properties

Code

The machine-readable code.

public string Code { get; init; }

Property Value

string

Details

Optional structured details that further describe the result.

public IReadOnlyList<FaultDetail>? Details { get; init; }

Property Value

IReadOnlyList<FaultDetail>

ExceptionType

The optional runtime exception type.

public string? ExceptionType { get; init; }

Property Value

string

Message

The message payload or description.

public string Message { get; init; }

Property Value

string

Retryable

true if the caller may safely retry the operation; otherwise, false.

public bool Retryable { get; init; }

Property Value

bool

Methods

Deconstruct(out string, out string, out string?, out bool, out IReadOnlyList<FaultDetail>?)

public void Deconstruct(out string Code, out string Message, out string? ExceptionType, out bool Retryable, out IReadOnlyList<FaultDetail>? Details)

Parameters

Code string
Message string
ExceptionType string
Retryable bool
Details IReadOnlyList<FaultDetail>

Equals(FaultMessage?)

public bool Equals(FaultMessage? other)

Parameters

other FaultMessage

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(FaultMessage?, FaultMessage?)

public static bool operator ==(FaultMessage? left, FaultMessage? right)

Parameters

left FaultMessage
right FaultMessage

Returns

bool

operator !=(FaultMessage?, FaultMessage?)

public static bool operator !=(FaultMessage? left, FaultMessage? right)

Parameters

left FaultMessage
right FaultMessage

Returns

bool