Table of Contents

Class ParsedExpressionDelegateExtensions

Namespace
LfrlAnvil.Computable.Expressions.Extensions
Assembly
LfrlAnvil.Computable.Expressions.dll

Contains IParsedExpressionDelegate<TArg, TResult> extension methods.

public static class ParsedExpressionDelegateExtensions
Inheritance
ParsedExpressionDelegateExtensions
Inherited Members

Methods

MapArguments<TArg, TResult>(IParsedExpressionDelegate<TArg, TResult>, IEnumerable<KeyValuePair<StringSegment, TArg?>>)

Creates a new buffer of argument values for the provided delegate.

[Pure]
public static TArg?[] MapArguments<TArg, TResult>(this IParsedExpressionDelegate<TArg, TResult> source, IEnumerable<KeyValuePair<StringSegment, TArg?>> arguments)

Parameters

source IParsedExpressionDelegate<TArg, TResult>

Source delegate.

arguments IEnumerable<KeyValuePair<StringSegment, TArg>>

Collection of (name, value) pairs that represents arguments and values to set for them.

Returns

TArg[]

New buffer of argument values.

Type Parameters

TArg

Argument type.

TResult

Result type.

Exceptions

InvalidParsedExpressionArgumentsException

When at least one argument does not exist.

MapArguments<TArg, TResult>(IParsedExpressionDelegate<TArg, TResult>, IEnumerable<KeyValuePair<string, TArg?>>)

Creates a new buffer of argument values for the provided delegate.

[Pure]
public static TArg?[] MapArguments<TArg, TResult>(this IParsedExpressionDelegate<TArg, TResult> source, IEnumerable<KeyValuePair<string, TArg?>> arguments)

Parameters

source IParsedExpressionDelegate<TArg, TResult>

Source delegate.

arguments IEnumerable<KeyValuePair<string, TArg>>

Collection of (name, value) pairs that represents arguments and values to set for them.

Returns

TArg[]

New buffer of argument values.

Type Parameters

TArg

Argument type.

TResult

Result type.

Exceptions

InvalidParsedExpressionArgumentsException

When at least one argument does not exist.

MapArguments<TArg, TResult>(IParsedExpressionDelegate<TArg, TResult>, params KeyValuePair<StringSegment, TArg?>[])

Creates a new buffer of argument values for the provided delegate.

[Pure]
public static TArg?[] MapArguments<TArg, TResult>(this IParsedExpressionDelegate<TArg, TResult> source, params KeyValuePair<StringSegment, TArg?>[] arguments)

Parameters

source IParsedExpressionDelegate<TArg, TResult>

Source delegate.

arguments KeyValuePair<StringSegment, TArg>[]

Collection of (name, value) pairs that represents arguments and values to set for them.

Returns

TArg[]

New buffer of argument values.

Type Parameters

TArg

Argument type.

TResult

Result type.

Exceptions

InvalidParsedExpressionArgumentsException

When at least one argument does not exist.

MapArguments<TArg, TResult>(IParsedExpressionDelegate<TArg, TResult>, params KeyValuePair<string, TArg?>[])

Creates a new buffer of argument values for the provided delegate.

[Pure]
public static TArg?[] MapArguments<TArg, TResult>(this IParsedExpressionDelegate<TArg, TResult> source, params KeyValuePair<string, TArg?>[] arguments)

Parameters

source IParsedExpressionDelegate<TArg, TResult>

Source delegate.

arguments KeyValuePair<string, TArg>[]

Collection of (name, value) pairs that represents arguments and values to set for them.

Returns

TArg[]

New buffer of argument values.

Type Parameters

TArg

Argument type.

TResult

Result type.

Exceptions

InvalidParsedExpressionArgumentsException

When at least one argument does not exist.

MapArguments<TArg, TResult>(IParsedExpressionDelegate<TArg, TResult>, TArg?[], IEnumerable<KeyValuePair<StringSegment, TArg?>>)

Populates the provided buffer of argument values for the provided delegate.

public static void MapArguments<TArg, TResult>(this IParsedExpressionDelegate<TArg, TResult> source, TArg?[] buffer, IEnumerable<KeyValuePair<StringSegment, TArg?>> arguments)

Parameters

source IParsedExpressionDelegate<TArg, TResult>

Source delegate.

buffer TArg[]

Target buffer of argument values.

arguments IEnumerable<KeyValuePair<StringSegment, TArg>>

Collection of (name, value) pairs that represents arguments and values to set for them.

Type Parameters

TArg

Argument type.

TResult

Result type.

Exceptions

InvalidParsedExpressionArgumentsException

When at least one argument does not exist.

ParsedExpressionArgumentBufferTooSmallException

When the provided buffer is too small.

MapArguments<TArg, TResult>(IParsedExpressionDelegate<TArg, TResult>, TArg?[], IEnumerable<KeyValuePair<string, TArg?>>)

Populates the provided buffer of argument values for the provided delegate.

public static void MapArguments<TArg, TResult>(this IParsedExpressionDelegate<TArg, TResult> source, TArg?[] buffer, IEnumerable<KeyValuePair<string, TArg?>> arguments)

Parameters

source IParsedExpressionDelegate<TArg, TResult>

Source delegate.

buffer TArg[]

Target buffer of argument values.

arguments IEnumerable<KeyValuePair<string, TArg>>

Collection of (name, value) pairs that represents arguments and values to set for them.

Type Parameters

TArg

Argument type.

TResult

Result type.

Exceptions

InvalidParsedExpressionArgumentsException

When at least one argument does not exist.

ParsedExpressionArgumentBufferTooSmallException

When the provided buffer is too small.

MapArguments<TArg, TResult>(IParsedExpressionDelegate<TArg, TResult>, TArg?[], params KeyValuePair<StringSegment, TArg?>[])

Populates the provided buffer of argument values for the provided delegate.

public static void MapArguments<TArg, TResult>(this IParsedExpressionDelegate<TArg, TResult> source, TArg?[] buffer, params KeyValuePair<StringSegment, TArg?>[] arguments)

Parameters

source IParsedExpressionDelegate<TArg, TResult>

Source delegate.

buffer TArg[]

Target buffer of argument values.

arguments KeyValuePair<StringSegment, TArg>[]

Collection of (name, value) pairs that represents arguments and values to set for them.

Type Parameters

TArg

Argument type.

TResult

Result type.

Exceptions

InvalidParsedExpressionArgumentsException

When at least one argument does not exist.

ParsedExpressionArgumentBufferTooSmallException

When the provided buffer is too small.

MapArguments<TArg, TResult>(IParsedExpressionDelegate<TArg, TResult>, TArg?[], params KeyValuePair<string, TArg?>[])

Populates the provided buffer of argument values for the provided delegate.

public static void MapArguments<TArg, TResult>(this IParsedExpressionDelegate<TArg, TResult> source, TArg?[] buffer, params KeyValuePair<string, TArg?>[] arguments)

Parameters

source IParsedExpressionDelegate<TArg, TResult>

Source delegate.

buffer TArg[]

Target buffer of argument values.

arguments KeyValuePair<string, TArg>[]

Collection of (name, value) pairs that represents arguments and values to set for them.

Type Parameters

TArg

Argument type.

TResult

Result type.

Exceptions

InvalidParsedExpressionArgumentsException

When at least one argument does not exist.

ParsedExpressionArgumentBufferTooSmallException

When the provided buffer is too small.

ToBuffered<TArg, TResult>(IParsedExpressionDelegate<TArg, TResult>)

[Pure]
public static ParsedExpressionBufferedDelegate<TArg, TResult> ToBuffered<TArg, TResult>(this IParsedExpressionDelegate<TArg, TResult> source)

Parameters

source IParsedExpressionDelegate<TArg, TResult>

Underlying delegate.

Returns

ParsedExpressionBufferedDelegate<TArg, TResult>

New ParsedExpressionBufferedDelegate<TArg, TResult> instance.

Type Parameters

TArg

Argument type.

TResult

Result type.