Class PrimitiveMap
A default implementation of IPrimitiveMap
Inheritance
System.Object
PrimitiveMap
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Apache.NMS.dll
Syntax
public class PrimitiveMap : IPrimitiveMap
Fields
BIG_STRING_TYPE
Declaration
public const byte BIG_STRING_TYPE = 13
Field Value
Type |
Description |
System.Byte |
|
BOOLEAN_TYPE
Declaration
public const byte BOOLEAN_TYPE = 1
Field Value
Type |
Description |
System.Byte |
|
BYTE_ARRAY_TYPE
Declaration
public const byte BYTE_ARRAY_TYPE = 10
Field Value
Type |
Description |
System.Byte |
|
BYTE_TYPE
Declaration
public const byte BYTE_TYPE = 2
Field Value
Type |
Description |
System.Byte |
|
CHAR_TYPE
Declaration
public const byte CHAR_TYPE = 3
Field Value
Type |
Description |
System.Byte |
|
DOUBLE_TYPE
Declaration
public const byte DOUBLE_TYPE = 7
Field Value
Type |
Description |
System.Byte |
|
FLOAT_TYPE
Declaration
public const byte FLOAT_TYPE = 8
Field Value
Type |
Description |
System.Byte |
|
INTEGER_TYPE
Declaration
public const byte INTEGER_TYPE = 5
Field Value
Type |
Description |
System.Byte |
|
LIST_TYPE
Declaration
public const byte LIST_TYPE = 12
Field Value
Type |
Description |
System.Byte |
|
LONG_TYPE
Declaration
public const byte LONG_TYPE = 6
Field Value
Type |
Description |
System.Byte |
|
MAP_TYPE
Declaration
public const byte MAP_TYPE = 11
Field Value
Type |
Description |
System.Byte |
|
NULL
Declaration
public const byte NULL = 0
Field Value
Type |
Description |
System.Byte |
|
SHORT_TYPE
Declaration
public const byte SHORT_TYPE = 4
Field Value
Type |
Description |
System.Byte |
|
STRING_TYPE
Declaration
public const byte STRING_TYPE = 9
Field Value
Type |
Description |
System.Byte |
|
Properties
Count
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
Item[String]
Declaration
public object this[string key] { get; set; }
Parameters
Type |
Name |
Description |
System.String |
key |
|
Property Value
Type |
Description |
System.Object |
|
Keys
Declaration
public ICollection Keys { get; }
Property Value
Type |
Description |
System.Collections.ICollection |
|
Values
Declaration
public ICollection Values { get; }
Property Value
Type |
Description |
System.Collections.ICollection |
|
Methods
CheckValidType(Object)
Declaration
protected virtual void CheckValidType(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
CheckValueType(Object, Type)
Declaration
protected virtual void CheckValueType(object value, Type type)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
System.Type |
type |
|
Clear()
Declaration
Contains(Object)
Declaration
public bool Contains(object key)
Parameters
Type |
Name |
Description |
System.Object |
key |
|
Returns
Type |
Description |
System.Boolean |
|
GetBool(String)
Declaration
public bool GetBool(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
GetByte(String)
Declaration
public byte GetByte(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Byte |
|
GetBytes(String)
Declaration
public byte[] GetBytes(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Byte[] |
|
GetChar(String)
Declaration
public char GetChar(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Char |
|
GetDictionary(String)
Declaration
public IDictionary GetDictionary(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Collections.IDictionary |
|
GetDouble(String)
Declaration
public double GetDouble(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Double |
|
GetFloat(String)
Declaration
public float GetFloat(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Single |
|
GetInt(String)
Declaration
public int GetInt(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int32 |
|
GetList(String)
Declaration
public IList GetList(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Collections.IList |
|
GetLong(String)
Declaration
public long GetLong(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int64 |
|
GetShort(String)
Declaration
public short GetShort(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int16 |
|
GetString(String)
Declaration
public string GetString(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.String |
|
GetValue(String)
Declaration
protected virtual object GetValue(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Object |
|
Marshal()
Declaration
Returns
Type |
Description |
System.Byte[] |
|
Marshal(Stream)
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.
Declaration
public void Marshal(Stream destination)
Parameters
Type |
Name |
Description |
System.IO.Stream |
destination |
A System.IO.Stream
|
MarshalPrimitive(BinaryWriter, Object)
Declaration
public static void MarshalPrimitive(BinaryWriter dataOut, object value)
Parameters
Type |
Name |
Description |
System.IO.BinaryWriter |
dataOut |
|
System.Object |
value |
|
MarshalPrimitiveList(IList, BinaryWriter)
Declaration
public static void MarshalPrimitiveList(IList list, BinaryWriter dataOut)
Parameters
Type |
Name |
Description |
System.Collections.IList |
list |
|
System.IO.BinaryWriter |
dataOut |
|
MarshalPrimitiveMap(IDictionary)
Marshals the primitive type map to a byte array
Declaration
public static byte[] MarshalPrimitiveMap(IDictionary map)
Parameters
Type |
Name |
Description |
System.Collections.IDictionary |
map |
|
Returns
Type |
Description |
System.Byte[] |
|
MarshalPrimitiveMap(IDictionary, BinaryWriter)
Declaration
public static void MarshalPrimitiveMap(IDictionary map, BinaryWriter dataOut)
Parameters
Type |
Name |
Description |
System.Collections.IDictionary |
map |
|
System.IO.BinaryWriter |
dataOut |
|
MarshalPrimitiveMap(IDictionary, Stream)
Declaration
public static void MarshalPrimitiveMap(IDictionary map, Stream stream)
Parameters
Type |
Name |
Description |
System.Collections.IDictionary |
map |
|
System.IO.Stream |
stream |
|
Remove(Object)
Declaration
public void Remove(object key)
Parameters
Type |
Name |
Description |
System.Object |
key |
|
SetBool(String, Boolean)
Declaration
public void SetBool(string key, bool value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Boolean |
value |
|
SetByte(String, Byte)
Declaration
public void SetByte(string key, byte value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Byte |
value |
|
SetBytes(String, Byte[])
Declaration
public void SetBytes(string key, byte[] value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Byte[] |
value |
|
SetBytes(String, Byte[], Int32, Int32)
Declaration
public void SetBytes(string key, byte[] value, int offset, int length)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Byte[] |
value |
|
System.Int32 |
offset |
|
System.Int32 |
length |
|
SetChar(String, Char)
Declaration
public void SetChar(string key, char value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Char |
value |
|
SetDictionary(String, IDictionary)
Declaration
public void SetDictionary(string key, IDictionary value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Collections.IDictionary |
value |
|
SetDouble(String, Double)
Declaration
public void SetDouble(string key, double value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Double |
value |
|
SetFloat(String, Single)
Declaration
public void SetFloat(string key, float value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Single |
value |
|
SetInt(String, Int32)
Declaration
public void SetInt(string key, int value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Int32 |
value |
|
SetList(String, IList)
Declaration
public void SetList(string key, IList value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Collections.IList |
value |
|
SetLong(String, Int64)
Declaration
public void SetLong(string key, long value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Int64 |
value |
|
SetShort(String, Int16)
Declaration
public void SetShort(string key, short value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Int16 |
value |
|
SetString(String, String)
Declaration
public void SetString(string key, string value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.String |
value |
|
SetValue(String, Object)
Declaration
protected virtual void SetValue(string key, object value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Object |
value |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
A string
|
Overrides
System.Object.ToString()
Unmarshal(Byte[])
Unmarshalls the map from the given data or if the data is null just
return an empty map
Declaration
public static PrimitiveMap Unmarshal(byte[] data)
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
Returns
Unmarshal(Stream)
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.
Declaration
public static PrimitiveMap Unmarshal(Stream source)
Parameters
Type |
Name |
Description |
System.IO.Stream |
source |
A System.IO.Stream
|
Returns
UnmarshalPrimitive(BinaryReader)
Declaration
public static object UnmarshalPrimitive(BinaryReader dataIn)
Parameters
Type |
Name |
Description |
System.IO.BinaryReader |
dataIn |
|
Returns
Type |
Description |
System.Object |
|
UnmarshalPrimitiveList(BinaryReader)
Declaration
public static IList UnmarshalPrimitiveList(BinaryReader dataIn)
Parameters
Type |
Name |
Description |
System.IO.BinaryReader |
dataIn |
|
Returns
Type |
Description |
System.Collections.IList |
|
UnmarshalPrimitiveMap(Byte[])
Unmarshals the primitive type map from the given byte array
Declaration
public static IDictionary UnmarshalPrimitiveMap(byte[] data)
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
Returns
Type |
Description |
System.Collections.IDictionary |
|
UnmarshalPrimitiveMap(BinaryReader)
Declaration
public static IDictionary UnmarshalPrimitiveMap(BinaryReader dataIn)
Parameters
Type |
Name |
Description |
System.IO.BinaryReader |
dataIn |
|
Returns
Type |
Description |
System.Collections.IDictionary |
|
UnmarshalPrimitiveMap(Stream)
Declaration
public static IDictionary UnmarshalPrimitiveMap(Stream source)
Parameters
Type |
Name |
Description |
System.IO.Stream |
source |
|
Returns
Type |
Description |
System.Collections.IDictionary |
|
Implements