C# Класс URSA.Web.Http.Converters.ConverterExtensions

Provides useful IConverter helpers.
Показать файл Открыть проект

Открытые методы

Метод Описание
ConvertFrom ( this converterProvider, object value, IResponseInfo response = null ) : string

Converts an object into a string response body.

ConvertTo ( this converterProvider, string value, Type type, IRequestInfo request = null ) : object

Converts string to given type.

ConvertToCollection ( this converterProvider, IEnumerable values, Type collectionType, IRequestInfo request = null ) : object

Converts string values to given collection.

Приватные методы

Метод Описание
ConvertUsingCustomConverters ( IConverterProvider converterProvider, IRequestInfo request, IEnumerable values, Type itemType ) : IEnumerable
ConvertUsingCustomConverters ( IConverterProvider converterProvider, IRequestInfo request, string value, Type type ) : object
ConvertUsingCustomConverters ( IConverterProvider converterProvider, IResponseInfo response, object value ) : string
ConvertUsingTypeConverters ( IEnumerable values, Type itemType, bool &success ) : IEnumerable
ConvertUsingTypeConverters ( string value, Type type, bool &success ) : object
ConvertUsingTypeConverters ( object value, bool &success ) : string

Описание методов

ConvertFrom() публичный статический Метод

Converts an object into a string response body.
public static ConvertFrom ( this converterProvider, object value, IResponseInfo response = null ) : string
converterProvider this Converter provider.
value object The value.
response IResponseInfo Optional response.
Результат string

ConvertTo() публичный статический Метод

Converts string to given type.
public static ConvertTo ( this converterProvider, string value, Type type, IRequestInfo request = null ) : object
converterProvider this The converter provider.
value string The value.
type System.Type The target type.
request IRequestInfo The request.
Результат object

ConvertToCollection() публичный статический Метод

Converts string values to given collection.
public static ConvertToCollection ( this converterProvider, IEnumerable values, Type collectionType, IRequestInfo request = null ) : object
converterProvider this The converter provider.
values IEnumerable The values.
collectionType System.Type The collection type.
request IRequestInfo The request.
Результат object