Table of Contents

Class MediatorErrorExtensions

Namespace
SimpleMediator
Assembly
SimpleMediator.dll

Helper extensions to extract metadata from MediatorError.

public static class MediatorErrorExtensions
Inheritance
MediatorErrorExtensions
Inherited Members

Methods

GetCode(MediatorError)

Gets the error code from the mediator error.

public static Option<string> GetCode(this MediatorError error)

Parameters

error MediatorError

The mediator error.

Returns

Option<string>

The error code if available.

GetDetails(MediatorError)

Gets the error details from the mediator error.

public static Option<object> GetDetails(this MediatorError error)

Parameters

error MediatorError

The mediator error.

Returns

Option<object>

The error details if available.

GetMetadata(MediatorError)

Gets the error metadata dictionary from the mediator error.

public static IReadOnlyDictionary<string, object?> GetMetadata(this MediatorError error)

Parameters

error MediatorError

The mediator error.

Returns

IReadOnlyDictionary<string, object>

The error metadata dictionary, or empty if not available.