Table of Contents

Class Error

Namespace
LightResults
Assembly
LightResults.dll

Represents an error with a message and associated metadata.

public class Error : IError

Inheritance

Implements

Inherited Members

Constructors

Error()

Initializes a new instance of the LightResults.Error class.

public Error()

Error(string)

Initializes a new instance of the LightResults.Error class with the specified error message.

public Error(string message)

Parameters

message string

The error message.

Error(string, (string Key, object Value))

Initializes a new instance of the LightResults.Error class with the specified error message and metadata.

public Error(string message, (string Key, object Value) metadata)

Parameters

message string

The error message.

metadata (string Key, object Value)

The metadata associated with the error.

Error(string, KeyValuePair<string, object>)

Initializes a new instance of the LightResults.Error class with the specified error message and metadata.

public Error(string message, KeyValuePair<string, object> metadata)

Parameters

message string

The error message.

metadata KeyValuePair<string, object>

The metadata associated with the error.

Error(string, IEnumerable<KeyValuePair<string, object>>)

Initializes a new instance of the LightResults.Error class with the specified error message and metadata.

public Error(string message, IEnumerable<KeyValuePair<string, object>> metadata)

Parameters

message string

The error message.

metadata IEnumerable<KeyValuePair<string, object>>

The metadata associated with the error.

Error(string, IReadOnlyDictionary<string, object>)

Initializes a new instance of the LightResults.Error class with the specified error message and metadata.

public Error(string message, IReadOnlyDictionary<string, object> metadata)

Parameters

message string

The error message.

metadata IReadOnlyDictionary<string, object>

The metadata associated with the error.

Properties

Message

Gets the error message.

public string Message { get; init; }

Property Value

string

Metadata

Gets the metadata associated with the error.

public IReadOnlyDictionary<string, object> Metadata { get; init; }

Property Value

IReadOnlyDictionary<string, object>

Remarks

The metadata is represented as a read-only dictionary of key-value pairs, where the keys are System.String and the values are System.Object.

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.