Table of Contents

Class ResultWithExceptionCollections<T>

Namespace
SunamoCollections
Assembly
SunamoCollections.dll

Wraps a result value along with an optional exception message.

public class ResultWithExceptionCollections<T>

Type Parameters

T

The type of the result data.

Inheritance
ResultWithExceptionCollections<T>
Inherited Members
Extension Methods

Constructors

ResultWithExceptionCollections()

Initializes a new empty instance.

public ResultWithExceptionCollections()

ResultWithExceptionCollections(Exception)

Initializes a new instance from an exception.

public ResultWithExceptionCollections(Exception exception)

Parameters

exception Exception

The exception to extract the message from.

ResultWithExceptionCollections(string)

Initializes a new instance with an exception message.

public ResultWithExceptionCollections(string exceptionMessage)

Parameters

exceptionMessage string

The exception message.

ResultWithExceptionCollections(T)

Initializes a new instance with result data.

public ResultWithExceptionCollections(T data)

Parameters

data T

The result data.

Properties

Data

Gets or sets the result data.

public T? Data { get; set; }

Property Value

T

ExceptionMessage

Gets or sets the exception message if an error occurred.

public string? ExceptionMessage { get; set; }

Property Value

string