C# Class URSA.Web.Http.Converters.ConverterExtensions

Provides useful IConverter helpers.
Afficher le fichier Open project: alien-mcl/URSA

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

ConvertFrom() public static méthode

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.
Résultat string

ConvertTo() public static méthode

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.
Résultat object

ConvertToCollection() public static méthode

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.
Résultat object