Interface IConfigurableParser<TOptions>
- Namespace
- Cuemon.Text
- Assembly
- Cuemon.Core.dll
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
StringThe string to convert.
targetType
TypeThe type of the object to return.
setup
Action<TOptions>The
TOptions
which may be configured.
Returns
- Object
An object of
targetType
equivalent toinput
.
Parse<T>(String, Action<TOptions>)
Converts the specified input
to an object of T
.
T Parse<T>(string input, Action<TOptions> setup = null)
Parameters
Returns
- T
An object of
T
equivalent toinput
.
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
StringThe string to convert.
targetType
TypeThe type of the object to return.
result
ObjectWhen this method returns, contains the object of
targetType
equivalent toinput
, if the conversion succeeded, ordefault
if the conversion failed.setup
Action<TOptions>The
TOptions
which may be configured.
Returns
- Boolean
true
ifinput
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
StringThe string to convert.
result
TWhen this method returns, contains the object of
T
equivalent toinput
, if the conversion succeeded, ordefault
if the conversion failed.setup
Action<TOptions>The
TOptions
which may be configured.
Returns
- Boolean
true
ifinput
was converted successfully; otherwise,false
.
Type Parameters
T
The type of the object to return.