C# Class 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
Inheritance: IDictionary
Afficher le fichier Open project: tomerfiliba/agnos Class Usage Examples

Protected Properties

Свойство Type Description
data System.Collections.Hashtable
fields FieldInfo>.Dictionary

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
ToStringHelper ( String indent, StringBuilder sb ) : void
getPackerForBuiltinType ( object val ) : Packers.AbstractPacker

Private Methods

Méthode Description
IEnumerable ( ) : IEnumerator

Method Details

Add() public méthode

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
Résultat void

Add() public méthode

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
Résultat void

Add() public méthode

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) ///
Résultat void

Add() public méthode

specialized version of Add
public Add ( String key, String value ) : void
key String
value String
Résultat void

Add() public méthode

specialized version of Add
public Add ( String key, int value ) : void
key String
value int
Résultat void

Add() public méthode

specialized version of Add
public Add ( int key, String value ) : void
key int
value String
Résultat void

Add() public méthode

specialized version of Add
public Add ( int key, int value ) : void
key int
value int
Résultat void

AddNewMap() public méthode

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 ///
Résultat HeteroMap

Clear() public méthode

public Clear ( ) : void
Résultat void

Contains() public méthode

public Contains ( Object key ) : bool
key Object
Résultat bool

ContainsKey() public méthode

public ContainsKey ( Object key ) : bool
key Object
Résultat bool

ContainsValue() public méthode

public ContainsValue ( Object value ) : bool
value Object
Résultat bool

CopyTo() public méthode

public CopyTo ( Array array, int arrayIndex ) : void
array System.Array
arrayIndex int
Résultat void

GetEnumerator() public méthode

public GetEnumerator ( ) : IDictionaryEnumerator
Résultat IDictionaryEnumerator

HeteroMap() public méthode

public HeteroMap ( ) : System
Résultat System

HeteroMap() public méthode

public HeteroMap ( HeteroMap other ) : System
other HeteroMap
Résultat System

HeteroMap() public méthode

public HeteroMap ( int capacity ) : System
capacity int
Résultat System

Remove() public méthode

public Remove ( object key ) : void
key object
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

ToStringHelper() protected méthode

protected ToStringHelper ( String indent, StringBuilder sb ) : void
indent String
sb StringBuilder
Résultat void

TryGetValue() public méthode

public TryGetValue ( Object key, Object &value ) : bool
key Object
value Object
Résultat bool

Update() public méthode

public Update ( HeteroMap other ) : void
other HeteroMap
Résultat void

getKeyPacker() public méthode

returns the key-packer associated with the given vey
public getKeyPacker ( Object key ) : Packers.AbstractPacker
key Object
Résultat Packers.AbstractPacker

getPackerForBuiltinType() protected méthode

protected getPackerForBuiltinType ( object val ) : Packers.AbstractPacker
val object
Résultat Packers.AbstractPacker

getValuePacker() public méthode

returns the value-packer associated with the given vey
public getValuePacker ( Object key ) : Packers.AbstractPacker
key Object
Résultat Packers.AbstractPacker

this() public méthode

public this ( Object key ) : Object
key Object
Résultat Object

Property Details

data protected_oe property

protected Hashtable,System.Collections data
Résultat System.Collections.Hashtable

fields protected_oe property

protected Dictionary fields
Résultat FieldInfo>.Dictionary