Skip to content

T_CodeJam_ValueOneOf_8

Andrew Koryavchenko edited this page Jun 17, 2018 · 2 revisions

ValueOneOf(T1, T2, T3, T4, T5, T6, T7, T8) Structure

Value type tagged union for 8 types.

Namespace: CodeJam
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public struct ValueOneOf<T1, T2, T3, T4, T5, T6, T7, T8> : IOneOf<T1, T2, T3, T4, T5, T6, T7, T8>, 
	IEquatable<ValueOneOf<T1, T2, T3, T4, T5, T6, T7, T8>>

VB

Public Structure ValueOneOf(Of T1, T2, T3, T4, T5, T6, T7, T8)
	Implements IOneOf(Of T1, T2, T3, T4, T5, T6, T7, T8), 
	IEquatable(Of ValueOneOf(Of T1, T2, T3, T4, T5, T6, T7, T8))

F#

[<SealedAttribute>]
type ValueOneOf<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8> =  
    struct
        interface IOneOf<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8>
        interface IEquatable<ValueOneOf<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8>>
    end

Type Parameters

 

T1
Type of case 1
T2
Type of case 2
T3
Type of case 3
T4
Type of case 4
T5
Type of case 5
T6
Type of case 6
T7
Type of case 7
T8
Type of case 8
  The ValueOneOf(T1, T2, T3, T4, T5, T6, T7, T8) type exposes the following members.

Properties

 

Name Description
Public property IsCase1 Returns true if class contains value of type T1.
Public property IsCase2 Returns true if class contains value of type T2.
Public property IsCase3 Returns true if class contains value of type T3.
Public property IsCase4 Returns true if class contains value of type T4.
Public property IsCase5 Returns true if class contains value of type T5.
Public property IsCase6 Returns true if class contains value of type T6.
Public property IsCase7 Returns true if class contains value of type T7.
Public property IsCase8 Returns true if class contains value of type T8.
  Back to Top

Methods

 

Name Description
Public methodStatic member Create(T1) Creates instance of OneOf(T1, T2, T3, T4, T5, T6, T7, T8) for value of type T1.
Public methodStatic member Create(T2) Creates instance of OneOf(T1, T2, T3, T4, T5, T6, T7, T8) for value of type T2.
Public methodStatic member Create(T3) Creates instance of OneOf(T1, T2, T3, T4, T5, T6, T7, T8) for value of type T3.
Public methodStatic member Create(T4) Creates instance of OneOf(T1, T2, T3, T4, T5, T6, T7, T8) for value of type T4.
Public methodStatic member Create(T5) Creates instance of OneOf(T1, T2, T3, T4, T5, T6, T7, T8) for value of type T5.
Public methodStatic member Create(T6) Creates instance of OneOf(T1, T2, T3, T4, T5, T6, T7, T8) for value of type T6.
Public methodStatic member Create(T7) Creates instance of OneOf(T1, T2, T3, T4, T5, T6, T7, T8) for value of type T7.
Public methodStatic member Create(T8) Creates instance of OneOf(T1, T2, T3, T4, T5, T6, T7, T8) for value of type T8.
Public method Do Calls action for actual type argument.
Public method Equals(Object) Indicates whether this instance and a specified object are equal. (Overrides ValueType.Equals(Object).)
Public method Equals(ValueOneOf(T1, T2, T3, T4, T5, T6, T7, T8)) Indicates whether the current object is equal to another object of the same type.
Public method GetHashCode Returns the hash code for this instance. (Overrides ValueType.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetValue(TResult) Calls func for actual type argument and returns calculated value.
Public method ToString Returns the fully qualified type name of this instance. (Inherited from ValueType.)
  Back to Top

Operators

 

Name Description
Public operatorStatic member Equality Equality operator.
Public operatorStatic member Implicit(T1 to ValueOneOf(T1, T2, T3, T4, T5, T6, T7, T8)) Implicit cast operator.
Public operatorStatic member Implicit(T2 to ValueOneOf(T1, T2, T3, T4, T5, T6, T7, T8)) Implicit cast operator.
Public operatorStatic member Implicit(T3 to ValueOneOf(T1, T2, T3, T4, T5, T6, T7, T8)) Implicit cast operator.
Public operatorStatic member Implicit(T4 to ValueOneOf(T1, T2, T3, T4, T5, T6, T7, T8)) Implicit cast operator.
Public operatorStatic member Implicit(T5 to ValueOneOf(T1, T2, T3, T4, T5, T6, T7, T8)) Implicit cast operator.
Public operatorStatic member Implicit(T6 to ValueOneOf(T1, T2, T3, T4, T5, T6, T7, T8)) Implicit cast operator.
Public operatorStatic member Implicit(T7 to ValueOneOf(T1, T2, T3, T4, T5, T6, T7, T8)) Implicit cast operator.
Public operatorStatic member Implicit(T8 to ValueOneOf(T1, T2, T3, T4, T5, T6, T7, T8)) Implicit cast operator.
Public operatorStatic member Inequality Unequality operator.
  Back to Top

See Also

Reference

CodeJam Namespace

Clone this wiki locally