-
Notifications
You must be signed in to change notification settings - Fork 35
T_CodeJam_Option
Andrew Koryavchenko edited this page Jun 17, 2018
·
6 revisions
Methods to work with Option
System.Object
CodeJam.Option
Namespace: CodeJam
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static class OptionVB
<ExtensionAttribute>
Public NotInheritable Class OptionF#
[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type Option = class endThe Option type exposes the following members.
| Name | Description | |
|---|---|---|
![]()
|
Do(T) | Calls someAction if option has value, and noneAction otherwise. |
![]()
|
GetValueOrDefault(T)(IOption(T), T) | Returns value of option, or defaultValue if option hasn't it. |
![]()
|
GetValueOrDefault(T, TResult)(IOption(T), Func(IOption(T), TResult), Func(TResult)) | Calls someSelector if option has value, and noneSelector otherwise. |
![]()
|
None(T) | Returns instance of Option without value. |
![]()
|
Some(T) | Creates instance of Option with specified value. |
![]()
|
SomeHasValue(T)(Nullable(T)) | Creates instance of Option with specified value, if value has value. |
![]()
|
SomeHasValue(T)(T) | Creates instance of Option with specified value, if value not null. |
![]()
|
With(T, TResult)(Option(T), Func(T, TResult)) | Converts option value to another option with selectFunc. |
![]()
|
With(T, TResult)(Option(T), Func(T, TResult), Func(TResult)) | Converts option value to another option with selectFunc. |
![]()
|
With(T, TResult)(Option(T), Func(T, TResult), TResult) | Converts option value to another option with selectFunc. |
