C# Class Simplify.Web.ModelBinding.Binders.Parsers.StringToSpecifiedObjectParser

Provides string to specified type parsing
ファイルを表示 Open project: i4004/Simplify.Web Class Usage Examples

Public Methods

Method Description
IsTypeValidForParsing ( Type type ) : bool

Determines whether specified type is valid for parsing.

ParseBool ( string value ) : bool

Parses the boolean from string.

ParseDateTime ( string value, string format = null ) : System.DateTime

Parses the date time from string.

ParseDecimal ( string value ) : decimal

Parses the decimal from string.

ParseEnum ( string value, Type enumType ) : object

Parses the enum from string.

ParseInt ( string value ) : int

Parses the int from string.

ParseLong ( string value ) : long

Parses the long from string.

ParseNullableBool ( string value ) : bool?

Parses the nullable boolean from string.

ParseNullableDateTime ( string value, string format = null ) : DateTime?

Parses the date time from string.

ParseNullableDecimal ( string value ) : decimal?

Parses the nullable decimal from string.

ParseNullableInt ( string value ) : int?

Parses the nullable int from string.

ParseNullableLong ( string value ) : long?

Parses the nullable long from string.

ParseString ( string value ) : string

Parses the string.

ParseUndefined ( string value, Type parsingType, string format = null ) : object

Determine variable type and parses it from string.

Method Details

IsTypeValidForParsing() public static method

Determines whether specified type is valid for parsing.
public static IsTypeValidForParsing ( Type type ) : bool
type System.Type The type.
return bool

ParseBool() public static method

Parses the boolean from string.
public static ParseBool ( string value ) : bool
value string The value.
return bool

ParseDateTime() public static method

Parses the date time from string.
public static ParseDateTime ( string value, string format = null ) : System.DateTime
value string The value.
format string The format.
return System.DateTime

ParseDecimal() public static method

Parses the decimal from string.
public static ParseDecimal ( string value ) : decimal
value string The value.
return decimal

ParseEnum() public static method

Parses the enum from string.
public static ParseEnum ( string value, Type enumType ) : object
value string The value.
enumType System.Type Type of the enum.
return object

ParseInt() public static method

Parses the int from string.
public static ParseInt ( string value ) : int
value string The value.
return int

ParseLong() public static method

Parses the long from string.
public static ParseLong ( string value ) : long
value string The value.
return long

ParseNullableBool() public static method

Parses the nullable boolean from string.
public static ParseNullableBool ( string value ) : bool?
value string The value.
return bool?

ParseNullableDateTime() public static method

Parses the date time from string.
public static ParseNullableDateTime ( string value, string format = null ) : DateTime?
value string The value.
format string The format.
return DateTime?

ParseNullableDecimal() public static method

Parses the nullable decimal from string.
public static ParseNullableDecimal ( string value ) : decimal?
value string The value.
return decimal?

ParseNullableInt() public static method

Parses the nullable int from string.
public static ParseNullableInt ( string value ) : int?
value string The value.
return int?

ParseNullableLong() public static method

Parses the nullable long from string.
public static ParseNullableLong ( string value ) : long?
value string The value.
return long?

ParseString() public static method

Parses the string.
public static ParseString ( string value ) : string
value string The value.
return string

ParseUndefined() public static method

Determine variable type and parses it from string.
public static ParseUndefined ( string value, Type parsingType, string format = null ) : object
value string The value.
parsingType System.Type Type to parse.
format string The format.
return object