C# Класс Agnos.HeteroMap

an heterogeneous map. it is basically a regular Dictionary, but it associates with each entry a packer for the key and a packer for the value. for "simple types", for which a packer can be inferred, you may use the 2-argument version of Add() or the [] operator, but for all other types, you should use the 4-argument version of Add(), where you specify the packers for the key and value. note: this class implements IDictionary, so it can be used by third-party code, but only for "simple types", for which a packer can be inferred
Наследование: IDictionary
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
data System.Collections.Hashtable
fields FieldInfo>.Dictionary

Открытые методы

Метод Описание
Add ( Object key, Object value ) : void

a Version of Add that implements IDictionary.Add. It attempts to infer the packers for the key and for the value

Add ( Object key, Object value, Packers valpacker ) : void

specialized version of Add that attempts to infer the packer for the key, but the packer for the value must be provided

Add ( Object key, Packers keypacker, Object value, Packers valpacker ) : void

Adds the given given value (with the given value-packer) under the given key (with the given key packer)

Add ( String key, String value ) : void

specialized version of Add

Add ( String key, int value ) : void

specialized version of Add

Add ( int key, String value ) : void

specialized version of Add

Add ( int key, int value ) : void

specialized version of Add

AddNewMap ( String name ) : HeteroMap

Adds a new HeteroMap instance to this HeteroMap under the given key This is a convenience function, used by the Agnos binding code, but it's not expected to be useful to the general public.

Clear ( ) : void
Contains ( Object key ) : bool
ContainsKey ( Object key ) : bool
ContainsValue ( Object value ) : bool
CopyTo ( Array array, int arrayIndex ) : void
GetEnumerator ( ) : IDictionaryEnumerator
HeteroMap ( ) : System
HeteroMap ( HeteroMap other ) : System
HeteroMap ( int capacity ) : System
Remove ( object key ) : void
ToString ( ) : string
TryGetValue ( Object key, Object &value ) : bool
Update ( HeteroMap other ) : void
getKeyPacker ( Object key ) : Packers.AbstractPacker

returns the key-packer associated with the given vey

getValuePacker ( Object key ) : Packers.AbstractPacker

returns the value-packer associated with the given vey

this ( Object key ) : Object

Защищенные методы

Метод Описание
ToStringHelper ( String indent, StringBuilder sb ) : void
getPackerForBuiltinType ( object val ) : Packers.AbstractPacker

Приватные методы

Метод Описание
IEnumerable ( ) : IEnumerator

Описание методов

Add() публичный Метод

a Version of Add that implements IDictionary.Add. It attempts to infer the packers for the key and for the value
public Add ( Object key, Object value ) : void
key Object
value Object
Результат void

Add() публичный Метод

specialized version of Add that attempts to infer the packer for the key, but the packer for the value must be provided
public Add ( Object key, Object value, Packers valpacker ) : void
key Object
value Object
valpacker Packers
Результат void

Add() публичный Метод

Adds the given given value (with the given value-packer) under the given key (with the given key packer)
public Add ( Object key, Packers keypacker, Object value, Packers valpacker ) : void
key Object /// The key (any object) ///
keypacker Packers /// The packer for the key (an AbstractPacker) ///
value Object /// The value (any object) ///
valpacker Packers /// The packer for the value (an AbstractPacker) ///
Результат void

Add() публичный Метод

specialized version of Add
public Add ( String key, String value ) : void
key String
value String
Результат void

Add() публичный Метод

specialized version of Add
public Add ( String key, int value ) : void
key String
value int
Результат void

Add() публичный Метод

specialized version of Add
public Add ( int key, String value ) : void
key int
value String
Результат void

Add() публичный Метод

specialized version of Add
public Add ( int key, int value ) : void
key int
value int
Результат void

AddNewMap() публичный Метод

Adds a new HeteroMap instance to this HeteroMap under the given key This is a convenience function, used by the Agnos binding code, but it's not expected to be useful to the general public.
public AddNewMap ( String name ) : HeteroMap
name String /// The key ///
Результат HeteroMap

Clear() публичный Метод

public Clear ( ) : void
Результат void

Contains() публичный Метод

public Contains ( Object key ) : bool
key Object
Результат bool

ContainsKey() публичный Метод

public ContainsKey ( Object key ) : bool
key Object
Результат bool

ContainsValue() публичный Метод

public ContainsValue ( Object value ) : bool
value Object
Результат bool

CopyTo() публичный Метод

public CopyTo ( Array array, int arrayIndex ) : void
array System.Array
arrayIndex int
Результат void

GetEnumerator() публичный Метод

public GetEnumerator ( ) : IDictionaryEnumerator
Результат IDictionaryEnumerator

HeteroMap() публичный Метод

public HeteroMap ( ) : System
Результат System

HeteroMap() публичный Метод

public HeteroMap ( HeteroMap other ) : System
other HeteroMap
Результат System

HeteroMap() публичный Метод

public HeteroMap ( int capacity ) : System
capacity int
Результат System

Remove() публичный Метод

public Remove ( object key ) : void
key object
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string

ToStringHelper() защищенный Метод

protected ToStringHelper ( String indent, StringBuilder sb ) : void
indent String
sb StringBuilder
Результат void

TryGetValue() публичный Метод

public TryGetValue ( Object key, Object &value ) : bool
key Object
value Object
Результат bool

Update() публичный Метод

public Update ( HeteroMap other ) : void
other HeteroMap
Результат void

getKeyPacker() публичный Метод

returns the key-packer associated with the given vey
public getKeyPacker ( Object key ) : Packers.AbstractPacker
key Object
Результат Packers.AbstractPacker

getPackerForBuiltinType() защищенный Метод

protected getPackerForBuiltinType ( object val ) : Packers.AbstractPacker
val object
Результат Packers.AbstractPacker

getValuePacker() публичный Метод

returns the value-packer associated with the given vey
public getValuePacker ( Object key ) : Packers.AbstractPacker
key Object
Результат Packers.AbstractPacker

this() публичный Метод

public this ( Object key ) : Object
key Object
Результат Object

Описание свойств

data защищенное свойство

protected Hashtable,System.Collections data
Результат System.Collections.Hashtable

fields защищенное свойство

protected Dictionary fields
Результат FieldInfo>.Dictionary