====== ThinkGeo.MapSuite.MvcEdition.GeoKeyedCollection‹T› ====== {{section>upgrade_map_suite_to_10.0}} Represents a strong-typed collection that can be accessed by index or by the identifier of an item. === Remarks === The GeoKeyedCollection class is a hybrid between a collection based on the IList generic interface and a collection based on the IDictionary generic interface. Like collections based on the IList generic interface, KeyedCollection is an indexed list of items. Like collections based on the IDictionary generic interface, KeyedCollection has a key associated with each element. The types that can be added to the GeoKeyedCollection must implement the IRequireId interface, which forces these types to have an Id property. Thus, we can get the item by identifier from the GeoKeyedCollection. The identifier must be unique and cannot be empty. ===== Inheritance Hierarchy ===== *System.Object **[[ThinkGeo.MapSuite.MvcEdition.GeoKeyedCollection‹T›]] ===== Members Summary ===== ==== Public Constructors ==== ^ Name ^ Parameters ^ DeclaringType ^ Summary ^ | {{wiki:PublicMethod.gif|Public Method}}[[#GeoKeyedCollection‹T›()|GeoKeyedCollection‹T›]] | | | Initializes a new instance of the GeoKeyedCollection class. | ==== Protected Constructors ==== ^ Name ^ Parameters ^ DeclaringType ^ Summary ^ ==== Public Methods ==== ^ Name ^ Parameters ^ DeclaringType ^ Summary ^ | {{wiki:PublicMethod.gif|Public Method}}[[#Add(T)|Add]] | T | Collection | | | {{wiki:PublicMethod.gif|Public Method}}[[#Clear()|Clear]] | | Collection | | | {{wiki:PublicMethod.gif|Public Method}}[[#Contains(String)|Contains]] | String | KeyedCollection | | | {{wiki:PublicMethod.gif|Public Method}}[[#Contains(T)|Contains]] | T | Collection | | | {{wiki:PublicMethod.gif|Public Method}}[[#CopyTo(T[], Int32)|CopyTo]] | T[], Int32 | Collection | | | {{wiki:PublicMethod.gif|Public Method}}[[#Equals(Object)|Equals]] | Object | Object | | | {{wiki:PublicMethod.gif|Public Method}}[[#FromJson(String)|FromJson]] | String | [[ThinkGeo.MapSuite.MvcEdition.GeoKeyedCollection|GeoKeyedCollection]] | Load this object from a json string. | | {{wiki:PublicMethod.gif|Public Method}}[[#GetEnumerator()|GetEnumerator]] | | Collection | | | {{wiki:PublicMethod.gif|Public Method}}[[#GetHashCode()|GetHashCode]] | | Object | | | {{wiki:PublicMethod.gif|Public Method}}[[#GetType()|GetType]] | | Object | | | {{wiki:PublicMethod.gif|Public Method}}[[#IndexOf(T)|IndexOf]] | T | Collection | | | {{wiki:PublicMethod.gif|Public Method}}[[#Insert(Int32, T)|Insert]] | Int32, T | Collection | | | {{wiki:PublicMethod.gif|Public Method}}[[#Remove(T)|Remove]] | T | Collection | | | {{wiki:PublicMethod.gif|Public Method}}[[#Remove(String)|Remove]] | String | KeyedCollection | | | {{wiki:PublicMethod.gif|Public Method}}[[#RemoveAt(Int32)|RemoveAt]] | Int32 | Collection | | | {{wiki:PublicMethod.gif|Public Method}}[[#ToJson()|ToJson]] | | [[ThinkGeo.MapSuite.MvcEdition.GeoKeyedCollection|GeoKeyedCollection]] | Returns a JSON string that contains information about all of the items in the collection. | | {{wiki:PublicMethod.gif|Public Method}}[[#ToString()|ToString]] | | Object | | ==== Protected Methods ==== ^ Name ^ Parameters ^ DeclaringType ^ Summary ^ | {{wiki:ProtectedMethod.gif|Protected Method}}[[#ChangeItemKey(T, String)|ChangeItemKey]] | T, String | KeyedCollection | | | {{wiki:ProtectedMethod.gif|Protected Method}}[[#ClearItems()|ClearItems]] | | Collection(overriden) | | | {{wiki:ProtectedMethod.gif|Protected Method}}[[#Finalize()|Finalize]] | | Object | | | {{wiki:ProtectedMethod.gif|Protected Method}}[[#GetKeyForItem(T)|GetKeyForItem]] | T | KeyedCollection(overriden) | When implemented in a derived class, extracts the key from the specified element. | | {{wiki:ProtectedMethod.gif|Protected Method}}[[#InsertItem(Int32, T)|InsertItem]] | Int32, T | Collection(overriden) | | | {{wiki:ProtectedMethod.gif|Protected Method}}[[#MemberwiseClone()|MemberwiseClone]] | | Object | | | {{wiki:ProtectedMethod.gif|Protected Method}}[[#RemoveItem(Int32)|RemoveItem]] | Int32 | Collection(overriden) | | | {{wiki:ProtectedMethod.gif|Protected Method}}[[#SetItem(Int32, T)|SetItem]] | Int32, T | Collection(overriden) | | ==== Public Properties ==== ^ Name ^ Return ^ DeclaringType ^ Summary ^ | {{wiki:PublicProperty.gif|Public Property}}[[#Comparer|Comparer]] | IEqualityComparer | KeyedCollection | | | {{wiki:PublicProperty.gif|Public Property}}[[#Count|Count]] | Int32 | Collection | | | {{wiki:PublicProperty.gif|Public Property}}[[#Item|Item]] | T | KeyedCollection | | | {{wiki:PublicProperty.gif|Public Property}}[[#Item|Item]] | T | Collection | | ==== Protected Properties ==== ^ Name ^ Return ^ DeclaringType ^ Summary ^ | {{wiki:ProtectedProperty.gif|Protected Property}}[[#Dictionary|Dictionary]] | IDictionary | KeyedCollection | | | {{wiki:ProtectedProperty.gif|Protected Property}}[[#Items|Items]] | IList | Collection | | ==== Public Events ==== ^ Name ^ Event Arguments ^ DeclaringType ^ Summary ^ ===== Public Constructors ===== ==== GeoKeyedCollection‹T›() ==== Initializes a new instance of the GeoKeyedCollection class. === Parameters === ^ Name ^ Type ^ Description ^ [[#Public Constructors|Go Back]] ===== Protected Constructors ===== ===== Public Methods ===== ==== Add(T) ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | item | T | | [[#Public Methods|Go Back]] ==== Clear() ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Public Methods|Go Back]] ==== Contains(String) ==== === Return Value === ^ Return Type ^ Description ^ | Boolean | | === Parameters === ^ Name ^ Type ^ Description ^ | key | String | | [[#Public Methods|Go Back]] ==== Contains(T) ==== === Return Value === ^ Return Type ^ Description ^ | Boolean | | === Parameters === ^ Name ^ Type ^ Description ^ | item | T | | [[#Public Methods|Go Back]] ==== CopyTo(T[], Int32) ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | array | T[] | | | index | Int32 | | [[#Public Methods|Go Back]] ==== Equals(Object) ==== === Return Value === ^ Return Type ^ Description ^ | Boolean | | === Parameters === ^ Name ^ Type ^ Description ^ | obj | Object | | [[#Public Methods|Go Back]] ==== FromJson(String) ==== Load this object from a json string. === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | jsonString | String | a json string | [[#Public Methods|Go Back]] ==== GetEnumerator() ==== === Return Value === ^ Return Type ^ Description ^ | IEnumerator | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Public Methods|Go Back]] ==== GetHashCode() ==== === Return Value === ^ Return Type ^ Description ^ | Int32 | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Public Methods|Go Back]] ==== GetType() ==== === Return Value === ^ Return Type ^ Description ^ | Type | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Public Methods|Go Back]] ==== IndexOf(T) ==== === Return Value === ^ Return Type ^ Description ^ | Int32 | | === Parameters === ^ Name ^ Type ^ Description ^ | item | T | | [[#Public Methods|Go Back]] ==== Insert(Int32, T) ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | index | Int32 | | | item | T | | [[#Public Methods|Go Back]] ==== Remove(T) ==== === Return Value === ^ Return Type ^ Description ^ | Boolean | | === Parameters === ^ Name ^ Type ^ Description ^ | item | T | | [[#Public Methods|Go Back]] ==== Remove(String) ==== === Return Value === ^ Return Type ^ Description ^ | Boolean | | === Parameters === ^ Name ^ Type ^ Description ^ | key | String | | [[#Public Methods|Go Back]] ==== RemoveAt(Int32) ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | index | Int32 | | [[#Public Methods|Go Back]] ==== ToJson() ==== Returns a JSON string that contains information about all of the items in the collection. === Return Value === ^ Return Type ^ Description ^ | String | A string that contains information about all of the items in the collection. | === Parameters === ^ Name ^ Type ^ Description ^ [[#Public Methods|Go Back]] ==== ToString() ==== === Return Value === ^ Return Type ^ Description ^ | String | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Public Methods|Go Back]] ===== Protected Methods ===== ==== ChangeItemKey(T, String) ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | item | T | | | newKey | String | | [[#Protected Methods|Go Back]] ==== ClearItems() ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Protected Methods|Go Back]] ==== Finalize() ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Protected Methods|Go Back]] ==== GetKeyForItem(T) ==== When implemented in a derived class, extracts the key from the specified element. === Return Value === ^ Return Type ^ Description ^ | String | The key for the specified element. | === Parameters === ^ Name ^ Type ^ Description ^ | item | T | The element from which to extract the key. | [[#Protected Methods|Go Back]] ==== InsertItem(Int32, T) ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | index | Int32 | | | item | T | | [[#Protected Methods|Go Back]] ==== MemberwiseClone() ==== === Return Value === ^ Return Type ^ Description ^ | Object | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Protected Methods|Go Back]] ==== RemoveItem(Int32) ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | index | Int32 | | [[#Protected Methods|Go Back]] ==== SetItem(Int32, T) ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | index | Int32 | | | item | T | | [[#Protected Methods|Go Back]] ===== Public Properties ===== ==== Comparer ==== === Return Value === ^ Return Type ^ | IEqualityComparer | [[#Public Properties|Go Back]] ==== Count ==== === Return Value === ^ Return Type ^ | Int32 | [[#Public Properties|Go Back]] ==== Item ==== === Return Value === ^ Return Type ^ | T | [[#Public Properties|Go Back]] ==== Item ==== === Return Value === ^ Return Type ^ | T | [[#Public Properties|Go Back]] ===== Protected Properties ===== ==== Dictionary ==== === Return Value === ^ Return Type ^ | IDictionary | [[#Protected Properties|Go Back]] ==== Items ==== === Return Value === ^ Return Type ^ | IList | [[#Protected Properties|Go Back]] ===== Public Events ===== __NOTOC__ [[Category:MvcEdition]] [[Category:ThinkGeo.MapSuite.MvcEdition]] [[Category:UpdateDocumentation]]