Class Option
Provides helper methods for creating instances of Option<T>.
Inheritance
System.Object
Option
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: MediatorForge.Results
Assembly: MediatorForge.dll
Syntax
public static class Option
Methods
| Improve this Doc View SourceNone<T>()
Gets an instance of Option<T> that represents no value.
Declaration
public static Option<T> None<T>()
Returns
Type | Description |
---|---|
Option<T> | An Option<T> that represents no value. |
Type Parameters
Name | Description |
---|---|
T | The type of the value. |
Some<T>(T)
Creates an instance of Option<T> that contains a value.
Declaration
public static Option<T> Some<T>(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to be contained. |
Returns
Type | Description |
---|---|
Option<T> | An Option<T> containing the specified value. |
Type Parameters
Name | Description |
---|---|
T | The type of the value. |