Class ValueOrError
Provides a set of factory methods to create objects that represent a value or an error.
Inheritance
System.Object
ValueOrError
Namespace: System.Memory
Assembly: Nuqleon.Memory.dll
Syntax
public static class ValueOrError : Object
Methods
CreateError<T>(Exception)
Creates an object that represents an error.
Declaration
public static IValueOrError<T> CreateError<T>(Exception exception)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Exception | exception | The error represented by the object. |
Returns
| Type | Description |
|---|---|
| IValueOrError<T> | An object representing the specified |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the value. |
CreateValue<T>(T)
Creates an object that represents a value.
Declaration
public static IValueOrError<T> CreateValue<T>(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The value represented by the object. |
Returns
| Type | Description |
|---|---|
| IValueOrError<T> | An object representing the specified |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the value. |