C# Class Woopsa.WoopsaFormat

ファイルを表示 Open project: woopsa-protocol/Woopsa Class Usage Examples

Public Methods

Method Description
DeserializeError ( string jsonErrorText ) : Exception
DeserializeMeta ( string jsonText ) : WoopsaMetaResult
DeserializeWoopsaValue ( string jsonText ) : WoopsaValue
JsonEscape ( string value ) : string

Escapes a string so it safe for being put into quotes "" into Json Data

JsonEscape ( StringBuilder stringBuilder, string value ) : void
JsonValueText ( this value ) : string
Serialize ( this e ) : string
Serialize ( this requests ) : string
Serialize ( this responses ) : string
Serialize ( StringBuilder stringBuilder, ClientRequest request ) : void
Serialize ( StringBuilder stringBuilder, WoopsaValue>.Dictionary keyValuePairs ) : void
Serialize ( StringBuilder stringBuilder, IEnumerable requests ) : void
Serialize ( StringBuilder stringBuilder, IWoopsaValue value ) : void
SerializeKeyValue ( StringBuilder stringBuilder, string key, string value, bool escapeValue, bool jsonEscapeValue ) : void
SerializeKeyValuePrefix ( StringBuilder stringBuilder, string key ) : void
SerializeMetadata ( this obj ) : string
SerializeMetadata ( this container, bool justName = false ) : string
ToBool ( string text ) : bool
ToStringWoopsa ( System.DateTime dateTime ) : string
ToStringWoopsa ( System.Int64 value ) : string
ToStringWoopsa ( System.TimeSpan timeSpan ) : string
ToStringWoopsa ( bool value ) : string
ToStringWoopsa ( double value ) : string
ToStringWoopsa ( int value ) : string
ToStringWoopsa ( object o ) : string
TryParseWoopsa ( string value, Int16 &result ) : bool
TryParseWoopsa ( string value, Int32 &result ) : bool
TryParseWoopsa ( string value, System.Int64 &result ) : bool
TryParseWoopsa ( string value, UInt16 &result ) : bool
TryParseWoopsa ( string value, UInt32 &result ) : bool
TryParseWoopsa ( string value, System.UInt64 &result ) : bool
TryParseWoopsa ( string value, byte &result ) : bool
TryParseWoopsa ( string value, double &result ) : bool
TryParseWoopsa ( string value, float &result ) : bool
TryParseWoopsa ( string value, sbyte &result ) : bool

Private Methods

Method Description
MustQuote ( WoopsaValueType type ) : bool
SerializeMetadata ( this elements ) : string
SerializeMetadata ( this argumentInfos ) : string

Method Details

DeserializeError() public static method

public static DeserializeError ( string jsonErrorText ) : Exception
jsonErrorText string
return System.Exception

DeserializeMeta() public static method

public static DeserializeMeta ( string jsonText ) : WoopsaMetaResult
jsonText string
return WoopsaMetaResult

DeserializeWoopsaValue() public static method

public static DeserializeWoopsaValue ( string jsonText ) : WoopsaValue
jsonText string
return WoopsaValue

JsonEscape() public static method

Escapes a string so it safe for being put into quotes "" into Json Data
public static JsonEscape ( string value ) : string
value string The string to escape
return string

JsonEscape() public static method

public static JsonEscape ( StringBuilder stringBuilder, string value ) : void
stringBuilder StringBuilder
value string
return void

JsonValueText() public static method

public static JsonValueText ( this value ) : string
value this
return string

Serialize() public static method

public static Serialize ( this e ) : string
e this
return string

Serialize() public static method

public static Serialize ( this requests ) : string
requests this
return string

Serialize() public static method

public static Serialize ( this responses ) : string
responses this
return string

Serialize() public static method

public static Serialize ( StringBuilder stringBuilder, ClientRequest request ) : void
stringBuilder StringBuilder
request ClientRequest
return void

Serialize() public static method

public static Serialize ( StringBuilder stringBuilder, WoopsaValue>.Dictionary keyValuePairs ) : void
stringBuilder StringBuilder
keyValuePairs WoopsaValue>.Dictionary
return void

Serialize() public static method

public static Serialize ( StringBuilder stringBuilder, IEnumerable requests ) : void
stringBuilder StringBuilder
requests IEnumerable
return void

Serialize() public static method

public static Serialize ( StringBuilder stringBuilder, IWoopsaValue value ) : void
stringBuilder StringBuilder
value IWoopsaValue
return void

SerializeKeyValue() public static method

public static SerializeKeyValue ( StringBuilder stringBuilder, string key, string value, bool escapeValue, bool jsonEscapeValue ) : void
stringBuilder StringBuilder
key string
value string
escapeValue bool
jsonEscapeValue bool
return void

SerializeKeyValuePrefix() public static method

public static SerializeKeyValuePrefix ( StringBuilder stringBuilder, string key ) : void
stringBuilder StringBuilder
key string
return void

SerializeMetadata() public static method

public static SerializeMetadata ( this obj ) : string
obj this
return string

SerializeMetadata() public static method

public static SerializeMetadata ( this container, bool justName = false ) : string
container this
justName bool
return string

ToBool() public static method

public static ToBool ( string text ) : bool
text string
return bool

ToStringWoopsa() public static method

public static ToStringWoopsa ( System.DateTime dateTime ) : string
dateTime System.DateTime
return string

ToStringWoopsa() public static method

public static ToStringWoopsa ( System.Int64 value ) : string
value System.Int64
return string

ToStringWoopsa() public static method

public static ToStringWoopsa ( System.TimeSpan timeSpan ) : string
timeSpan System.TimeSpan
return string

ToStringWoopsa() public static method

public static ToStringWoopsa ( bool value ) : string
value bool
return string

ToStringWoopsa() public static method

public static ToStringWoopsa ( double value ) : string
value double
return string

ToStringWoopsa() public static method

public static ToStringWoopsa ( int value ) : string
value int
return string

ToStringWoopsa() public static method

public static ToStringWoopsa ( object o ) : string
o object
return string

TryParseWoopsa() public static method

public static TryParseWoopsa ( string value, Int16 &result ) : bool
value string
result System.Int16
return bool

TryParseWoopsa() public static method

public static TryParseWoopsa ( string value, Int32 &result ) : bool
value string
result System.Int32
return bool

TryParseWoopsa() public static method

public static TryParseWoopsa ( string value, System.Int64 &result ) : bool
value string
result System.Int64
return bool

TryParseWoopsa() public static method

public static TryParseWoopsa ( string value, UInt16 &result ) : bool
value string
result System.UInt16
return bool

TryParseWoopsa() public static method

public static TryParseWoopsa ( string value, UInt32 &result ) : bool
value string
result System.UInt32
return bool

TryParseWoopsa() public static method

public static TryParseWoopsa ( string value, System.UInt64 &result ) : bool
value string
result System.UInt64
return bool

TryParseWoopsa() public static method

public static TryParseWoopsa ( string value, byte &result ) : bool
value string
result byte
return bool

TryParseWoopsa() public static method

public static TryParseWoopsa ( string value, double &result ) : bool
value string
result double
return bool

TryParseWoopsa() public static method

public static TryParseWoopsa ( string value, float &result ) : bool
value string
result float
return bool

TryParseWoopsa() public static method

public static TryParseWoopsa ( string value, sbyte &result ) : bool
value string
result sbyte
return bool