SumType<T1,T2> Struct
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Struct that may contain a T1
or a T2
.
generic <typename T1, typename T2>
public value class SumType : IEquatable<Microsoft::VisualStudio::LanguageServer::Protocol::SumType<T1, T2>>, Microsoft::VisualStudio::LanguageServer::Protocol::ISumType
[Newtonsoft.Json.JsonConverter(typeof(Microsoft.VisualStudio.LanguageServer.Protocol.SumConverter))]
public struct SumType<T1,T2> : IEquatable<Microsoft.VisualStudio.LanguageServer.Protocol.SumType<T1,T2>>, Microsoft.VisualStudio.LanguageServer.Protocol.ISumType
[<Newtonsoft.Json.JsonConverter(typeof(Microsoft.VisualStudio.LanguageServer.Protocol.SumConverter))>]
type SumType<'T1, 'T2> = struct
interface ISumType
Public Structure SumType(Of T1, T2)
Implements IEquatable(Of SumType(Of T1, T2)), ISumType
- T1
The first type this struct is designed to contain.
- T2
The second type this struct is designed to contain.
- Inheritance
-
SumType<T1,T2>
- Attributes
-
Newtonsoft.Json.JsonConverterAttribute
- Implements
-
ISumType IEquatable<SumType<T1,T2>>
Sum |
Initializes a new instance of the SumType<T1,T2> struct containing a |
Sum |
Initializes a new instance of the SumType<T1,T2> struct containing a |
First |
Gets the value as the first specified type. |
Second |
Gets the value as the second specified type. |
Value |
Gets the value stored in the SumType. This can be matched against using the "is" operator. |
Equals(Object) | Indicates whether this instance and a specified object are equal. |
Equals(Sum |
Indicates whether the current object is equal to another object of the same type. |
Get |
Returns the hash code for this instance. |
Match<TResult>(Func<T1,TResult>, Func<T2,TResult>, Func<TResult>) |
Runs a delegate corresponding to which type is contained inside this instance. |
Try |
Tries to get the value as the first specified type. |
Try |
Tries to get the value as the second specified type. |
Equality(Sum |
|
Explicit(Sum |
Attempts to cast an instance of SumType<T1,T2> to an instance of |
Explicit(Sum |
Attempts to cast an instance of SumType<T1,T2> to an instance of |
Implicit(T1 to Nullable<Sum |
|
Implicit(T1 to Sum |
|
Implicit(T2 to Nullable<Sum |
|
Implicit(T2 to Sum |
|
Inequality(Sum |
Προϊόν | Εκδόσεις |
---|---|
Visual Studio SDK | 2019, 2022 |