Table of Contents

Class Arguments

Namespace
Cuemon.Collections.Generic
Assembly
Cuemon.Kernel.dll

Provides static helper methods for wrapping, projecting, and concatenating arguments as arrays and enumerable sequences.

public static class Arguments
Inheritance
Arguments

Methods

Concat<T>(T[], T[])

Concatenates two arrays.

public static T[] Concat<T>(T[] args1, T[] args2)

Parameters

args1 T[]

The first array to concatenate.

args2 T[]

The array to concatenate to the first array.

Returns

T[]

A new array that contains the elements of args1 followed by the elements of args2.

Type Parameters

T

The type of the elements of the input arrays.

ToArray(params object[])

Returns the specified arguments as an array of Object.

public static object[] ToArray(params object[] args)

Parameters

args object[]

The arguments to return as an array of Object.

Returns

object[]

The specified args.

Remarks

This method performs no conversion. It simply returns the supplied arguments as an array of Object.

ToArrayOf<T>(params T[])

Returns the specified arguments as an array of T.

public static T[] ToArrayOf<T>(params T[] args)

Parameters

args T[]

The arguments to return as an array of T.

Returns

T[]

The specified args.

Type Parameters

T

The type of the elements in args.

Remarks

This method performs no conversion. It simply returns the supplied arguments as a T array.

ToEnumerable(params object[])

Returns the specified arguments as an IEnumerable<T> of Object.

public static IEnumerable<object> ToEnumerable(params object[] args)

Parameters

args object[]

The arguments to return as an enumerable sequence of Object.

Returns

IEnumerable<object>

The specified args exposed as an IEnumerable<T> of Object.

Remarks

This method performs no conversion. It simply exposes the supplied arguments through the IEnumerable<T> interface.

ToEnumerableOf<T>(params T[])

Returns the specified arguments as an IEnumerable<T>.

public static IEnumerable<T> ToEnumerableOf<T>(params T[] args)

Parameters

args T[]

The arguments to return as an IEnumerable<T>.

Returns

IEnumerable<T>

The specified args exposed as an IEnumerable<T>.

Type Parameters

T

The type of the elements in args.

Remarks

This method performs no conversion. It simply exposes the supplied arguments through the IEnumerable<T> interface.

Yield<T>(T)

Returns an IEnumerable<T> with the specified arg as the only element.

public static IEnumerable<T> Yield<T>(T arg)

Parameters

arg T

The T to type as IEnumerable<T>.

Returns

IEnumerable<T>

An IEnumerable<T> with the specified arg as the only element.

Type Parameters

T

The type of the element of arg.

Remarks

The Yield<T>(T) method has no effect other than to change the compile-time type of arg from T to IEnumerable<T>.