Interface ICommandConverter<T>
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>.
Inherited Members
Namespace: SixLabors.ImageSharp.Web.Commands.Converters
Assembly: SixLabors.ImageSharp.Web.dll
Syntax
public interface ICommandConverter<T> : ICommandConverter
Type Parameters
Name | Description |
---|---|
T | The type this converter returns. |
Methods
| Edit this page View SourceConvertFrom(CommandParser, CultureInfo, string?, Type)
Converts the given string to the type of this converter, using the specified culture information.
Declaration
T? ConvertFrom(CommandParser parser, CultureInfo culture, string? value, Type propertyType)
Parameters
Type | Name | Description |
---|---|---|
CommandParser | parser | The command parser use for parting commands. |
CultureInfo | culture | The CultureInfo to use as the current parsing culture. |
string | value | The string to convert. |
Type | propertyType | The property type that the converter will convert to. |
Returns
Type | Description |
---|---|
T | A string that represents the converted value. |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The conversion cannot be performed. |