Class ResultWithExceptionCollections<T>
- Namespace
- SunamoCollections
- Assembly
- SunamoCollections.dll
Wraps a result value along with an optional exception message.
public class ResultWithExceptionCollections<T>
Type Parameters
TThe 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
exceptionExceptionThe exception to extract the message from.
ResultWithExceptionCollections(string)
Initializes a new instance with an exception message.
public ResultWithExceptionCollections(string exceptionMessage)
Parameters
exceptionMessagestringThe exception message.
ResultWithExceptionCollections(T)
Initializes a new instance with result data.
public ResultWithExceptionCollections(T data)
Parameters
dataTThe 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; }