Interface IConfigurableParser<TOptions>
public interface IConfigurableParser<out TOptions> where TOptions : class, IParameterObject, new()
Type Parameters
TOptionsThe 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<out TOptions> setup = null)
Parameters
inputstringThe string to convert.
targetTypeTypeThe type of the object to return.
setupAction<TOptions>The
TOptionswhich may be configured.
Returns
- object
An object of
targetTypeequivalent toinput.
Parse<T>(string, Action<TOptions>)
Converts the specified input to an object of T.
T Parse<T>(string input, Action<out TOptions> setup = null)
Parameters
Returns
- T
An object of
Tequivalent toinput.
Type Parameters
TThe 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<out TOptions> setup = null)
Parameters
inputstringThe string to convert.
targetTypeTypeThe type of the object to return.
resultobjectWhen this method returns, contains the object of
targetTypeequivalent toinput, if the conversion succeeded, ordefaultif the conversion failed.setupAction<TOptions>The
TOptionswhich may be configured.
Returns
- bool
trueifinputwas 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<out TOptions> setup = null)
Parameters
inputstringThe string to convert.
resultTWhen this method returns, contains the object of
Tequivalent toinput, if the conversion succeeded, ordefaultif the conversion failed.setupAction<TOptions>The
TOptionswhich may be configured.
Returns
- bool
trueifinputwas converted successfully; otherwise,false.
Type Parameters
TThe type of the object to return.