Table of Contents

Class IntegralNumberConverter<T>

Namespace
SixLabors.ImageSharp.Web.Commands.Converters
Assembly
SixLabors.ImageSharp.Web.dll

The generic converter for integral types.

public sealed class IntegralNumberConverter<T> : ICommandConverter<T>, ICommandConverter where T : struct, IConvertible, IComparable<T>

Type Parameters

T
Inheritance
IntegralNumberConverter<T>
Implements
Inherited Members

Properties

Type

Gets the type this converter returns.

public Type Type { get; }

Property Value

Type

Methods

ConvertFrom(CommandParser, CultureInfo, string?, Type)

Converts the given string to the type of this converter, using the specified culture information.

public T ConvertFrom(CommandParser parser, CultureInfo culture, string? value, Type propertyType)

Parameters

parser CommandParser

The command parser use for parting commands.

culture CultureInfo

The CultureInfo to use as the current parsing culture.

value string

The string to convert.

propertyType Type

The property type that the converter will convert to.

Returns

T

A string that represents the converted value.

Exceptions

NotSupportedException

The conversion cannot be performed.