Interface IConfigurableParser<TResult, TOptions>
- Namespace
- Cuemon.Text
- Assembly
- Cuemon.Core.dll
Defines methods that converts a 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
Returns
- TResult
A
TResult
equivalent toinput
.
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
StringThe string to convert.
result
TResultWhen this method returns, contains the
TResult
equivalent of theinput
, 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
.