Summary
Represents an option type with a value of T.
- Namespace
- FunctionalSharp
.OptionTypes - Interfaces
-
- IOption
<T>
- IOption
- Base Types
-
- object
graph TD
Base0["object"]-->Type
Interface0["IOption<T>"]-.->Type
Type["Some<T>"]
class Type type-node
Syntax
[Serializable]
public class Some<T> : IOption<T>
Attributes
| Type | Description |
|---|---|
| Serializable |
Type Parameters
| Name | Description |
|---|---|
| T |
Methods
| Name | Value | Summary |
|---|---|---|
| IfNotNullDo |
void |
Performs the action with the value.
|
| Match |
void |
performs the withvalue action.
|
| Match |
TResult |
Performas the withvalue function.
|
| Match |
TResult |
performs the withvalue function to get a value of TResult.
|
| ToNullable |
T |
returns the value of T.
|
| ToString |
string |
returns the tostring method of T.
|
Extension Methods
| Name | Value | Summary |
|---|---|---|
| Match |
Pattern |
Starts a pattern match for a single value. Subsequent calls to With() need to be used to specify conditions
|
| ToOption |
IOption |
Turns the type T into an option type.
From OptionExtensions
|
