C# Class RabbitMQ.Client.Content.PrimitiveParser

Utility class for extracting typed values from strings.
显示文件 Open project: rabbitmq/rabbitmq-dotnet-client Class Usage Examples

Public Methods

Method Description
CreateProtocolViolationException ( string targetType, object source ) : Exception

Creates the protocol violation exception.

ParseBool ( string value ) : bool

Attempt to parse a string representation of a bool.

ParseByte ( string value ) : byte

Attempt to parse a string representation of a byte.

ParseDouble ( string value ) : double

Attempt to parse a string representation of a double.

ParseFloat ( string value ) : float

Attempt to parse a string representation of a float.

ParseInt ( string value ) : int

Attempt to parse a string representation of an int.

ParseLong ( string value ) : long

Attempt to parse a string representation of a long.

ParseShort ( string value ) : short

Attempt to parse a string representation of a short.

Method Details

CreateProtocolViolationException() public static method

Creates the protocol violation exception.
public static CreateProtocolViolationException ( string targetType, object source ) : Exception
targetType string Type of the target.
source object The source.
return System.Exception

ParseBool() public static method

Attempt to parse a string representation of a bool.
public static ParseBool ( string value ) : bool
value string
return bool

ParseByte() public static method

Attempt to parse a string representation of a byte.
public static ParseByte ( string value ) : byte
value string
return byte

ParseDouble() public static method

Attempt to parse a string representation of a double.
public static ParseDouble ( string value ) : double
value string
return double

ParseFloat() public static method

Attempt to parse a string representation of a float.
public static ParseFloat ( string value ) : float
value string
return float

ParseInt() public static method

Attempt to parse a string representation of an int.
public static ParseInt ( string value ) : int
value string
return int

ParseLong() public static method

Attempt to parse a string representation of a long.
public static ParseLong ( string value ) : long
value string
return long

ParseShort() public static method

Attempt to parse a string representation of a short.
public static ParseShort ( string value ) : short
value string
return short