Table of Contents

CreateConfigurableParser Method

Definition

Namespace
Cuemon.Text
Assemblies
Cuemon.Core.dll
Source
src/Cuemon.Core/Text/ParserFactory.cs

CreateConfigurableParser<TOptions>(Func<string, Type, Action<TOptions>, object>)

Creates an IConfigurableParser<TOptions> implementation from the specified parser.

public static IConfigurableParser<TOptions> CreateConfigurableParser<TOptions>(Func<string, Type, Action<TOptions>, object> parser) where TOptions : class, IParameterObject, new()

Parameters

parser Func<string, Type, Action<TOptions>, object>

The function delegate that does the actual parsing of a string.

Returns

IConfigurableParser<TOptions>

An IConfigurableParser<TOptions> implementation.

Type Parameters

TOptions

The type of the delegate setup.

CreateConfigurableParser<TResult, TOptions>(Func<string, Action<TOptions>, TResult>)

Creates an IConfigurableParser<TResult, TOptions> implementation from the specified parser.

public static IConfigurableParser<TResult, TOptions> CreateConfigurableParser<TResult, TOptions>(Func<string, Action<TOptions>, TResult> parser) where TOptions : class, IParameterObject, new()

Parameters

parser Func<string, Action<TOptions>, TResult>

The function delegate that does the actual parsing of a string.

Returns

IConfigurableParser<TResult, TOptions>

An IConfigurableParser<TResult, TOptions> implementation.

Type Parameters

TResult

The type of the converted result.

TOptions

The type of the delegate setup.