public abstract class PrimitiveParser

Summary

Utility class for extracting typed values from strings.

Method Summary

Flags Name Summary
public static ProtocolViolationException CreateProtocolViolationException(string targetType, object source)

Creates the protocol violation exception.

public static bool ParseBool(string value)

Attempt to parse a string representation of a .

public static byte ParseByte(string value)

Attempt to parse a string representation of a .

public static double ParseDouble(string value)

Attempt to parse a string representation of a .

public static single ParseFloat(string value)

Attempt to parse a string representation of a .

public static int ParseInt(string value)

Attempt to parse a string representation of an .

public static long ParseLong(string value)

Attempt to parse a string representation of a .

public static short ParseShort(string value)

Attempt to parse a string representation of a .

Method Detail

CreateProtocolViolationException

public static ProtocolViolationException CreateProtocolViolationException(string targetType, object source)

Flags public static
Return type ProtocolViolationException
Parameters
Name Type
targetType string
source object

Summary

Creates the protocol violation exception.

Param

Type of the target.

Param

The source.

Returns

Instance of the .

ParseBool

public static bool ParseBool(string value)

Flags public static
Return type bool
Parameters
Name Type
value string

Summary

Attempt to parse a string representation of a .

Exception

ParseByte

public static byte ParseByte(string value)

Flags public static
Return type byte
Parameters
Name Type
value string

Summary

Attempt to parse a string representation of a .

Exception

ParseDouble

public static double ParseDouble(string value)

Flags public static
Return type double
Parameters
Name Type
value string

Summary

Attempt to parse a string representation of a .

Exception

ParseFloat

public static single ParseFloat(string value)

Flags public static
Return type single
Parameters
Name Type
value string

Summary

Attempt to parse a string representation of a .

Exception

ParseInt

public static int ParseInt(string value)

Flags public static
Return type int
Parameters
Name Type
value string

Summary

Attempt to parse a string representation of an .

Exception

ParseLong

public static long ParseLong(string value)

Flags public static
Return type long
Parameters
Name Type
value string

Summary

Attempt to parse a string representation of a .

Exception

ParseShort

public static short ParseShort(string value)

Flags public static
Return type short
Parameters
Name Type
value string

Summary

Attempt to parse a string representation of a .

Exception