C# Класс Microsoft.Scripting.MutableTuple

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
MaxSize int

Открытые методы

Метод Описание
Create ( ) : Expression

Provides an expression for creating a tuple with the specified values.

GetAccessPath ( Type tupleType, int index ) : IEnumerable

Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple.

GetNestedValue ( int size, int index ) : object

Gets the value at the given index for a tuple of the given size. This get supports walking through nested tuples to get the correct final index.

GetSize ( Type tupleType ) : int

Gets the number of usable slots in the provided Tuple type including slots available in nested tuples.

GetTupleType ( int size ) : Type

Gets the unbound generic Tuple type which has at lease size slots or null if a large enough tuple is not available.

GetTupleValues ( MutableTuple tuple ) : object[]

Gets the values from a tuple including unpacking nested values.

GetValue ( int index ) : object
MakeTuple ( Type tupleType ) : MutableTuple

Creates a new instance of tupleType with the specified args. If the tuple is a nested tuple the values are added in their nested forms.

MakeTupleType ( ) : Type

Creates a generic tuple with the specified types. If the number of slots fits within the maximum tuple size then we simply create a single tuple. If it's greater then we create nested tuples (e.g. a Tuple`2 which contains a Tuple`128 and a Tuple`8 if we had a size of 136).

SetNestedValue ( int size, int index, object value ) : void

Sets the value at the given index for a tuple of the given size. This set supports walking through nested tuples to get the correct final index.

SetValue ( int index, object value ) : void

Приватные методы

Метод Описание
CreateNew ( Type tupleType, int start, int end, Expression values ) : Expression
CreateTupleInstance ( Type tupleType, int start, int end, object args ) : MutableTuple
GetAccessPath ( int size, int index ) : IEnumerable
GetAccessProperties ( Type tupleType, int size, int index ) : IEnumerable

Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple.

GetTupleValues ( MutableTuple tuple, List args ) : void
MakeTuple ( Type tupleType, int start, int end, object args ) : MutableTuple
MakeTupleType ( Type types, int start, int end ) : Type
PowerOfTwoRound ( int value ) : int

Описание методов

Create() публичный статический Метод

Provides an expression for creating a tuple with the specified values.
public static Create ( ) : Expression
Результат Expression

GetAccessPath() публичный статический Метод

Gets the series of properties that needs to be accessed to access a logical item in a potentially nested tuple.
public static GetAccessPath ( Type tupleType, int index ) : IEnumerable
tupleType System.Type
index int
Результат IEnumerable

GetNestedValue() публичный Метод

Gets the value at the given index for a tuple of the given size. This get supports walking through nested tuples to get the correct final index.
public GetNestedValue ( int size, int index ) : object
size int
index int
Результат object

GetSize() публичный статический Метод

Gets the number of usable slots in the provided Tuple type including slots available in nested tuples.
public static GetSize ( Type tupleType ) : int
tupleType System.Type
Результат int

GetTupleType() публичный статический Метод

Gets the unbound generic Tuple type which has at lease size slots or null if a large enough tuple is not available.
public static GetTupleType ( int size ) : Type
size int
Результат System.Type

GetTupleValues() публичный статический Метод

Gets the values from a tuple including unpacking nested values.
public static GetTupleValues ( MutableTuple tuple ) : object[]
tuple MutableTuple
Результат object[]

GetValue() публичный абстрактный Метод

public abstract GetValue ( int index ) : object
index int
Результат object

MakeTuple() публичный статический Метод

Creates a new instance of tupleType with the specified args. If the tuple is a nested tuple the values are added in their nested forms.
public static MakeTuple ( Type tupleType ) : MutableTuple
tupleType System.Type
Результат MutableTuple

MakeTupleType() публичный статический Метод

Creates a generic tuple with the specified types. If the number of slots fits within the maximum tuple size then we simply create a single tuple. If it's greater then we create nested tuples (e.g. a Tuple`2 which contains a Tuple`128 and a Tuple`8 if we had a size of 136).
public static MakeTupleType ( ) : Type
Результат System.Type

SetNestedValue() публичный Метод

Sets the value at the given index for a tuple of the given size. This set supports walking through nested tuples to get the correct final index.
public SetNestedValue ( int size, int index, object value ) : void
size int
index int
value object
Результат void

SetValue() публичный абстрактный Метод

public abstract SetValue ( int index, object value ) : void
index int
value object
Результат void

Описание свойств

MaxSize публичное статическое свойство

public static int MaxSize
Результат int