Table of Contents

Interface IConfigurableParser<TOptions>

Namespace
Cuemon.Text
Assembly
Cuemon.Core.dll

Defines methods that converts a String to an Object of a particular type.

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

Type Parameters

TOptions

The type of the delegate setup.

Methods

Parse(String, Type, Action<TOptions>)

Converts the specified input to an object of targetType.

object Parse(string input, Type targetType, Action<TOptions> setup = null)

Parameters

input String

The string to convert.

targetType Type

The type of the object to return.

setup Action<TOptions>

The TOptions which may be configured.

Returns

Object

An object of targetType equivalent to input.

Parse<T>(String, Action<TOptions>)

Converts the specified input to an object of T.

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

Parameters

input String

The string to convert.

setup Action<TOptions>

The TOptions which may be configured.

Returns

T

An object of T equivalent to input.

Type Parameters

T

The type of the object to return.

TryParse(String, Type, out Object, Action<TOptions>)

Converts the specified input to an object of targetType. A return value indicates whether the conversion succeeded.

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

Parameters

input String

The string to convert.

targetType Type

The type of the object to return.

result Object

When this method returns, contains the object of targetType equivalent to 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.

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

Converts the specified input to an object of T. A return value indicates whether the conversion succeeded.

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

Parameters

input String

The string to convert.

result T

When this method returns, contains the object of T equivalent to 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.

Type Parameters

T

The type of the object to return.

See Also