Interface ICommandConverter<T>
- Namespace
- SixLabors.ImageSharp.Web.Commands.Converters
- Assembly
- SixLabors.ImageSharp.Web.dll
Defines a contract for converting the value of a string into a different data type. Implementations should be stateless by design and also implement ICommandConverter<T>.
public interface ICommandConverter<T> : ICommandConverter
Type Parameters
TThe type this converter returns.
- Inherited Members
Methods
ConvertFrom(CommandParser, CultureInfo, string?, Type)
Converts the given string to the type of this converter, using the specified culture information.
T? ConvertFrom(CommandParser parser, CultureInfo culture, string? value, Type propertyType)
Parameters
parserCommandParserThe command parser use for parting commands.
cultureCultureInfoThe CultureInfo to use as the current parsing culture.
valuestringThe string to convert.
propertyTypeTypeThe property type that the converter will convert to.
Returns
- T
A string that represents the converted value.
Exceptions
- NotSupportedException
The conversion cannot be performed.