C# Class Apache.NMS.Util.PrimitiveMap

A default implementation of IPrimitiveMap
Inheritance: IPrimitiveMap
Datei anzeigen Open project: ThorTech/apache-nms Class Usage Examples

Public Methods

Method Description
Clear ( ) : void
Contains ( Object key ) : bool
GetBool ( String key ) : bool
GetByte ( String key ) : byte
GetBytes ( string key ) : byte[]
GetChar ( String key ) : char
GetDictionary ( String key ) : IDictionary
GetDouble ( String key ) : double
GetFloat ( String key ) : float
GetInt ( String key ) : int
GetList ( String key ) : IList
GetLong ( String key ) : long
GetShort ( String key ) : short
GetString ( string key ) : string
Marshal ( ) : byte[]
Marshal ( Stream destination ) : void

Marshals a PrimitiveMap directly to a Stream object. This allows a client to write a PrimitiveMap in a compressed or otherwise encoded form without this class needing to know about it.

MarshalPrimitive ( BinaryWriter dataOut, Object value ) : void
MarshalPrimitiveList ( IList list, BinaryWriter dataOut ) : void
MarshalPrimitiveMap ( IDictionary map ) : byte[]

Marshals the primitive type map to a byte array

MarshalPrimitiveMap ( IDictionary map, BinaryWriter dataOut ) : void
MarshalPrimitiveMap ( IDictionary map, Stream stream ) : void
Remove ( Object key ) : void
SetBool ( String key, bool value ) : void
SetByte ( String key, byte value ) : void
SetBytes ( String key, byte value ) : void
SetBytes ( String key, byte value, int offset, int length ) : void
SetChar ( String key, char value ) : void
SetDictionary ( String key, IDictionary value ) : void
SetDouble ( String key, double value ) : void
SetFloat ( String key, float value ) : void
SetInt ( String key, int value ) : void
SetList ( String key, IList value ) : void
SetLong ( String key, long value ) : void
SetShort ( String key, short value ) : void
SetString ( string key, string value ) : void
ToString ( ) : String

Method ToString

Unmarshal ( Stream source ) : PrimitiveMap

Unmarshals a PrimitiveMap directly from a Stream object. This allows for clients to read PrimitiveMaps from Compressed or other wise encoded streams without this class needing to know about it.

Unmarshal ( byte data ) : PrimitiveMap

Unmarshalls the map from the given data or if the data is null just return an empty map

UnmarshalPrimitive ( BinaryReader dataIn ) : Object
UnmarshalPrimitiveList ( BinaryReader dataIn ) : IList
UnmarshalPrimitiveMap ( BinaryReader dataIn ) : IDictionary
UnmarshalPrimitiveMap ( Stream source ) : IDictionary
UnmarshalPrimitiveMap ( byte data ) : IDictionary

Unmarshals the primitive type map from the given byte array

this ( string key ) : object

Protected Methods

Method Description
CheckValidType ( Object value ) : void
CheckValueType ( Object value, Type type ) : void
GetValue ( String key ) : Object
SetValue ( String key, Object value ) : void

Method Details

CheckValidType() protected method

protected CheckValidType ( Object value ) : void
value Object
return void

CheckValueType() protected method

protected CheckValueType ( Object value, Type type ) : void
value Object
type System.Type
return void

Clear() public method

public Clear ( ) : void
return void

Contains() public method

public Contains ( Object key ) : bool
key Object
return bool

GetBool() public method

public GetBool ( String key ) : bool
key String
return bool

GetByte() public method

public GetByte ( String key ) : byte
key String
return byte

GetBytes() public method

public GetBytes ( string key ) : byte[]
key string
return byte[]

GetChar() public method

public GetChar ( String key ) : char
key String
return char

GetDictionary() public method

public GetDictionary ( String key ) : IDictionary
key String
return IDictionary

GetDouble() public method

public GetDouble ( String key ) : double
key String
return double

GetFloat() public method

public GetFloat ( String key ) : float
key String
return float

GetInt() public method

public GetInt ( String key ) : int
key String
return int

GetList() public method

public GetList ( String key ) : IList
key String
return IList

GetLong() public method

public GetLong ( String key ) : long
key String
return long

GetShort() public method

public GetShort ( String key ) : short
key String
return short

GetString() public method

public GetString ( string key ) : string
key string
return string

GetValue() protected method

protected GetValue ( String key ) : Object
key String
return Object

Marshal() public method

public Marshal ( ) : byte[]
return byte[]

Marshal() public method

Marshals a PrimitiveMap directly to a Stream object. This allows a client to write a PrimitiveMap in a compressed or otherwise encoded form without this class needing to know about it.
public Marshal ( Stream destination ) : void
destination Stream /// A ///
return void

MarshalPrimitive() public static method

public static MarshalPrimitive ( BinaryWriter dataOut, Object value ) : void
dataOut System.IO.BinaryWriter
value Object
return void

MarshalPrimitiveList() public static method

public static MarshalPrimitiveList ( IList list, BinaryWriter dataOut ) : void
list IList
dataOut System.IO.BinaryWriter
return void

MarshalPrimitiveMap() public static method

Marshals the primitive type map to a byte array
public static MarshalPrimitiveMap ( IDictionary map ) : byte[]
map IDictionary
return byte[]

MarshalPrimitiveMap() public static method

public static MarshalPrimitiveMap ( IDictionary map, BinaryWriter dataOut ) : void
map IDictionary
dataOut System.IO.BinaryWriter
return void

MarshalPrimitiveMap() public static method

public static MarshalPrimitiveMap ( IDictionary map, Stream stream ) : void
map IDictionary
stream Stream
return void

Remove() public method

public Remove ( Object key ) : void
key Object
return void

SetBool() public method

public SetBool ( String key, bool value ) : void
key String
value bool
return void

SetByte() public method

public SetByte ( String key, byte value ) : void
key String
value byte
return void

SetBytes() public method

public SetBytes ( String key, byte value ) : void
key String
value byte
return void

SetBytes() public method

public SetBytes ( String key, byte value, int offset, int length ) : void
key String
value byte
offset int
length int
return void

SetChar() public method

public SetChar ( String key, char value ) : void
key String
value char
return void

SetDictionary() public method

public SetDictionary ( String key, IDictionary value ) : void
key String
value IDictionary
return void

SetDouble() public method

public SetDouble ( String key, double value ) : void
key String
value double
return void

SetFloat() public method

public SetFloat ( String key, float value ) : void
key String
value float
return void

SetInt() public method

public SetInt ( String key, int value ) : void
key String
value int
return void

SetList() public method

public SetList ( String key, IList value ) : void
key String
value IList
return void

SetLong() public method

public SetLong ( String key, long value ) : void
key String
value long
return void

SetShort() public method

public SetShort ( String key, short value ) : void
key String
value short
return void

SetString() public method

public SetString ( string key, string value ) : void
key string
value string
return void

SetValue() protected method

protected SetValue ( String key, Object value ) : void
key String
value Object
return void

ToString() public method

Method ToString
public ToString ( ) : String
return String

Unmarshal() public static method

Unmarshals a PrimitiveMap directly from a Stream object. This allows for clients to read PrimitiveMaps from Compressed or other wise encoded streams without this class needing to know about it.
public static Unmarshal ( Stream source ) : PrimitiveMap
source Stream /// A ///
return PrimitiveMap

Unmarshal() public static method

Unmarshalls the map from the given data or if the data is null just return an empty map
public static Unmarshal ( byte data ) : PrimitiveMap
data byte
return PrimitiveMap

UnmarshalPrimitive() public static method

public static UnmarshalPrimitive ( BinaryReader dataIn ) : Object
dataIn System.IO.BinaryReader
return Object

UnmarshalPrimitiveList() public static method

public static UnmarshalPrimitiveList ( BinaryReader dataIn ) : IList
dataIn System.IO.BinaryReader
return IList

UnmarshalPrimitiveMap() public static method

public static UnmarshalPrimitiveMap ( BinaryReader dataIn ) : IDictionary
dataIn System.IO.BinaryReader
return IDictionary

UnmarshalPrimitiveMap() public static method

public static UnmarshalPrimitiveMap ( Stream source ) : IDictionary
source Stream
return IDictionary

UnmarshalPrimitiveMap() public static method

Unmarshals the primitive type map from the given byte array
public static UnmarshalPrimitiveMap ( byte data ) : IDictionary
data byte
return IDictionary

this() public method

public this ( string key ) : object
key string
return object