Helper type for handling the special way the Plotly.NET core API uses generics. In short, the problem arises because many optional parameters of Plotly.NET's core API are generics with a type constraint for `IConvertible`. This means that these parameters can be both value and reference types (e.g. `double` and `System.DateTime` both implement IConvertible). If we now have a optional parameter of type `T? where T: IConvertible` the compiler will not allow this without further type constrainst to eithe reference or value type. This is a problem because we want to 1. allow both, and 2. have a reliable way of determining if the value was not set because the F# API expects to be passed `Option.None` in that case. There exist other workarounds like checking if the value is default or null, but that changes valid default values actually set to null as well.
Constructor | Description |
Full Usage:
Optional(Value, IsSome)
Parameters:
'T
-
The value to mark as optional
IsSome : bool
-
Wether or not the wrapped value is valid. This is used downstream to determine wether to wrap this value into `Option.Some` (if true) or `Option.None` (if false)
|
Helper type for handling the special way the Plotly.NET core API uses generics. In short, the problem arises because many optional parameters of Plotly.NET's core API are generics with a type constraint for `IConvertible`. This means that these parameters can be both value and reference types (e.g. `double` and `System.DateTime` both implement IConvertible). If we now have a optional parameter of type `T? where T: IConvertible` the compiler will not allow this without further type constrainst to eithe reference or value type. This is a problem because we want to 1. allow both, and 2. have a reliable way of determining if the value was not set because the F# API expects to be passed `Option.None` in that case. There exist other workarounds like checking if the value is default or null, but that changes valid default values actually set to null as well.
|
Instance member | Description |
Full Usage:
this.Deconstruct
Parameters:
byref<'T>
IsSome : byref<bool>
|
|
Full Usage:
this.Equals
Parameters:
obj
Returns: bool
Modifiers: abstract |
|
|
|
Full Usage:
this.GetHashCode
Returns: int
Modifiers: abstract |
|
Full Usage:
this.IsSome
|
|
Full Usage:
this.ToString
Returns: string
Modifiers: abstract |
|
Full Usage:
this.Value
|
|
Static member | Description |
|
|
|
|
|
|