Class TupleExtensions
Provides extension methods for tuples.
Inherited Members
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public static class TupleExtensions
Methods
| Edit this page View SourceAsReadOnlySpan<T>(in ValueTuple)
Obtains read-only span over tuple items.
Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this in ValueTuple tuple)
Parameters
Type | Name | Description |
---|---|---|
() | tuple | The tuple. |
Returns
Type | Description |
---|---|
ReadOnlySpan<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsReadOnlySpan<T>(ref readonly (T, T, T, T, T, T, T))
Obtains read-only span over tuple items.
Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T, T, T, T, T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T, T, T, T, T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
ReadOnlySpan<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsReadOnlySpan<T>(ref readonly (T, T, T, T, T, T))
Obtains read-only span over tuple items.
Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T, T, T, T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T, T, T, T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
ReadOnlySpan<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsReadOnlySpan<T>(ref readonly (T, T, T, T, T))
Obtains read-only span over tuple items.
Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T, T, T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T, T, T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
ReadOnlySpan<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsReadOnlySpan<T>(ref readonly (T, T, T, T))
Obtains read-only span over tuple items.
Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T, T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T, T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
ReadOnlySpan<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsReadOnlySpan<T>(ref readonly (T, T, T))
Obtains read-only span over tuple items.
Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
ReadOnlySpan<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsReadOnlySpan<T>(ref readonly (T, T))
Obtains read-only span over tuple items.
Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly (T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
ReadOnlySpan<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsReadOnlySpan<T>(ref readonly ValueTuple<T>)
Obtains read-only span over tuple items.
Declaration
public static ReadOnlySpan<T> AsReadOnlySpan<T>(this ref readonly ValueTuple<T> tuple)
Parameters
Type | Name | Description |
---|---|---|
ValueTuple<T> | tuple | The tuple. |
Returns
Type | Description |
---|---|
ReadOnlySpan<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsSpan<T>(ref ValueTuple)
Obtains a span over tuple items.
Declaration
public static Span<T> AsSpan<T>(this ref ValueTuple tuple)
Parameters
Type | Name | Description |
---|---|---|
() | tuple | The tuple. |
Returns
Type | Description |
---|---|
Span<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsSpan<T>(ref (T, T, T, T, T, T, T))
Obtains a span over tuple items.
Declaration
public static Span<T> AsSpan<T>(this ref (T, T, T, T, T, T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T, T, T, T, T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
Span<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsSpan<T>(ref (T, T, T, T, T, T))
Obtains a span over tuple items.
Declaration
public static Span<T> AsSpan<T>(this ref (T, T, T, T, T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T, T, T, T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
Span<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsSpan<T>(ref (T, T, T, T, T))
Obtains a span over tuple items.
Declaration
public static Span<T> AsSpan<T>(this ref (T, T, T, T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T, T, T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
Span<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsSpan<T>(ref (T, T, T, T))
Obtains a span over tuple items.
Declaration
public static Span<T> AsSpan<T>(this ref (T, T, T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T, T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
Span<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsSpan<T>(ref (T, T, T))
Obtains a span over tuple items.
Declaration
public static Span<T> AsSpan<T>(this ref (T, T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
Span<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsSpan<T>(ref (T, T))
Obtains a span over tuple items.
Declaration
public static Span<T> AsSpan<T>(this ref (T, T) tuple)
Parameters
Type | Name | Description |
---|---|---|
(T, T) | tuple | The tuple. |
Returns
Type | Description |
---|---|
Span<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
AsSpan<T>(ref ValueTuple<T>)
Obtains a span over tuple items.
Declaration
public static Span<T> AsSpan<T>(this ref ValueTuple<T> tuple)
Parameters
Type | Name | Description |
---|---|---|
ValueTuple<T> | tuple | The tuple. |
Returns
Type | Description |
---|---|
Span<T> | The span over items in the tuple. |
Type Parameters
Name | Description |
---|---|
T | The type of items in the tuple. |
ToArray<T>(T)
Copies tuple items to an array.
Declaration
public static object?[] ToArray<T>(this T tuple) where T : notnull, ITuple
Parameters
Type | Name | Description |
---|---|---|
T | tuple | The tuple instance. |
Returns
Type | Description |
---|---|
object[] | An array of tuple items. |
Type Parameters
Name | Description |
---|---|
T | The type of the tuple. |