C# Class Jayrock.Json.JsonNumber

Datei anzeigen Open project: phdesign/NppToolBucket Class Usage Examples

Private Properties

Property Type Description
IConvertible System.DateTime
IConvertible TypeCode
IConvertible bool
IConvertible byte
IConvertible char
IConvertible decimal
IConvertible double
IConvertible float
IConvertible int
IConvertible long
IConvertible object
IConvertible sbyte
IConvertible short
IConvertible string
IConvertible uint
IConvertible ulong
IConvertible ushort
Regex System.Text.RegularExpressions.Regex

Public Methods

Method Description
Equals ( JsonNumber other ) : bool
Equals ( object obj ) : bool
GetHashCode ( ) : int
IsValid ( string text ) : bool

Determines if given text is a valid number per JSON grammar described in RFC 4627.

IsValid ( string text, NumberStyles styles ) : bool

Determines if given text is a valid number per JSON grammar described in RFC 4627. An additional parameter can be used to specify whether leading and/or trailing white space should be allowed or not.

If whitespace is allowed then any whitespace as per Unicode is permitted, which is a wider set than what, for example, NumberStyles.AllowTrailingWhite and NumberStyles.AllowLeadingWhite list in their documentation.

JsonNumber ( string value ) : System
LogicallyEquals ( object o ) : bool
ToBoolean ( ) : bool
ToByte ( ) : byte
ToChar ( ) : char
ToDateTime ( ) : System.DateTime
ToDecimal ( ) : decimal
ToDouble ( ) : double
ToInt16 ( ) : short
ToInt32 ( ) : int
ToInt64 ( ) : long
ToSingle ( ) : float
ToString ( ) : string

Private Methods

Method Description
IConvertible ( IFormatProvider provider ) : System.DateTime
IConvertible ( ) : TypeCode
IConvertible ( IFormatProvider provider ) : bool
IConvertible ( IFormatProvider provider ) : byte
IConvertible ( IFormatProvider provider ) : char
IConvertible ( IFormatProvider provider ) : decimal
IConvertible ( IFormatProvider provider ) : double
IConvertible ( IFormatProvider provider ) : float
IConvertible ( IFormatProvider provider ) : int
IConvertible ( IFormatProvider provider ) : long
IConvertible ( Type conversionType, IFormatProvider provider ) : object
IConvertible ( IFormatProvider provider ) : sbyte
IConvertible ( IFormatProvider provider ) : short
IConvertible ( IFormatProvider provider ) : string
IConvertible ( IFormatProvider provider ) : uint
IConvertible ( IFormatProvider provider ) : ulong
IConvertible ( IFormatProvider provider ) : ushort
Regex ( bool lws, bool rws ) : Regex

Method Details

Equals() public method

public Equals ( JsonNumber other ) : bool
other JsonNumber
return bool

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

IsValid() public static method

Determines if given text is a valid number per JSON grammar described in RFC 4627.
public static IsValid ( string text ) : bool
text string
return bool

IsValid() public static method

Determines if given text is a valid number per JSON grammar described in RFC 4627. An additional parameter can be used to specify whether leading and/or trailing white space should be allowed or not.
If whitespace is allowed then any whitespace as per Unicode is permitted, which is a wider set than what, for example, NumberStyles.AllowTrailingWhite and NumberStyles.AllowLeadingWhite list in their documentation.
public static IsValid ( string text, NumberStyles styles ) : bool
text string
styles NumberStyles
return bool

JsonNumber() public method

public JsonNumber ( string value ) : System
value string
return System

LogicallyEquals() public method

public LogicallyEquals ( object o ) : bool
o object
return bool

ToBoolean() public method

public ToBoolean ( ) : bool
return bool

ToByte() public method

public ToByte ( ) : byte
return byte

ToChar() public method

public ToChar ( ) : char
return char

ToDateTime() public method

public ToDateTime ( ) : System.DateTime
return System.DateTime

ToDecimal() public method

public ToDecimal ( ) : decimal
return decimal

ToDouble() public method

public ToDouble ( ) : double
return double

ToInt16() public method

public ToInt16 ( ) : short
return short

ToInt32() public method

public ToInt32 ( ) : int
return int

ToInt64() public method

public ToInt64 ( ) : long
return long

ToSingle() public method

public ToSingle ( ) : float
return float

ToString() public method

public ToString ( ) : string
return string