Table of Contents

Interface IConfigurableParser<TResult, TOptions>

Namespace
Cuemon.Text
Assembly
Cuemon.Core.dll

Defines methods that converts a System.String to a generic object of TResult.

public interface IConfigurableParser<TResult, out TOptions>
    where TOptions : class, new()

Type Parameters

TResult

The type of the converted result.

TOptions

The type of the delegate setup.

Methods

Parse(String, Action<TOptions>)

Converts the input to its TResult equivalent.

TResult Parse(string input, Action<TOptions> setup = null)

Parameters

input String

The string to convert.

setup Action<TOptions>

The TOptions which may be configured.

Returns

TResult

A TResult equivalent to input.

TryParse(String, out TResult, Action<TOptions>)

Converts the input to its TResult equivalent. A return input indicates whether the conversion succeeded.

bool TryParse(string input, out TResult result, Action<TOptions> setup = null)

Parameters

input String

The string to convert.

result TResult

When this method returns, contains the TResult equivalent of the input, if the conversion succeeded, or default if the conversion failed.

setup Action<TOptions>

The TOptions which may be configured.

Returns

Boolean

true if input was converted successfully; otherwise, false.