ThinkGeo.MapSuite.MvcEdition.GeoKeyedCollection‹T›
Note: The page was created before Map Suite 10. Map Suite 10.0 organized many classes into new namespaces and assemblies as well as had a few minor breaks in compatibility. The majority of previously built code should work without modification assuming the new namespaces are added. For guidance on upgrading your existing code, please check out MapSuite 10 Upgrade Guide.
<!– Class –>
Represents a strong-typed collection that can be accessed by index or by the identifier of an item.
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
Members Summary
Public Constructors
Name | Parameters | DeclaringType | Summary |
GeoKeyedCollection‹T› | | | Initializes a new instance of the GeoKeyedCollection class. |
Protected Constructors
Name | Parameters | DeclaringType | Summary |
Public Methods
Protected Methods
Public Properties
Name | Return | DeclaringType | Summary |
Comparer | IEqualityComparer<String> | KeyedCollection<String,T> | |
Count | Int32 | Collection<T> | |
Item | T | KeyedCollection<String,T> | |
Item | T | Collection<T> | |
Protected Properties
Name | Return | DeclaringType | Summary |
Dictionary | IDictionary<String,T> | KeyedCollection<String,T> | |
Items | IList<T> | Collection<T> | |
Public Events
Name | Event Arguments | DeclaringType | Summary |
Public Constructors
GeoKeyedCollection‹T›()
Initializes a new instance of the GeoKeyedCollection class.
Parameters
Protected Constructors
Public Methods
Add(T)
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
Name | Type | Description |
item | T<!– T –> | |
<!– Collection{T} –>
Go Back
Clear()
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
Contains(String)
Return Value
Return Type | Description |
Boolean<!– System.Boolean –> | |
Parameters
Name | Type | Description |
key | String<!– System.String –> | |
<!– KeyedCollection{System.String,T} –>
Go Back
Contains(T)
Return Value
Return Type | Description |
Boolean<!– System.Boolean –> | |
Parameters
Name | Type | Description |
item | T<!– T –> | |
<!– Collection{T} –>
Go Back
CopyTo(T[], Int32)
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
Equals(Object)
Return Value
Return Type | Description |
Boolean<!– System.Boolean –> | |
Parameters
Name | Type | Description |
obj | Object<!– System.Object –> | |
<!– System.Object –>
Go Back
FromJson(String)
Load this object from a json string.
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
Name | Type | Description |
jsonString | String<!– System.String –> | a json string |
<!– ThinkGeo.MapSuite.MvcEdition.GeoKeyedCollection{T} –>
Go Back
GetEnumerator()
Return Value
Return Type | Description |
IEnumerator<T><!– IEnumerator{T} –> | |
Parameters
GetHashCode()
Return Value
Return Type | Description |
Int32<!– System.Int32 –> | |
Parameters
GetType()
Return Value
Return Type | Description |
Type<!– System.Type –> | |
Parameters
IndexOf(T)
Return Value
Return Type | Description |
Int32<!– System.Int32 –> | |
Parameters
Name | Type | Description |
item | T<!– T –> | |
<!– Collection{T} –>
Go Back
Insert(Int32, T)
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
Name | Type | Description |
index | Int32<!– System.Int32 –> | |
item | T<!– T –> | |
<!– Collection{T} –>
Go Back
Remove(T)
Return Value
Return Type | Description |
Boolean<!– System.Boolean –> | |
Parameters
Name | Type | Description |
item | T<!– T –> | |
<!– Collection{T} –>
Go Back
Remove(String)
Return Value
Return Type | Description |
Boolean<!– System.Boolean –> | |
Parameters
Name | Type | Description |
key | String<!– System.String –> | |
<!– KeyedCollection{System.String,T} –>
Go Back
RemoveAt(Int32)
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
Name | Type | Description |
index | Int32<!– System.Int32 –> | |
<!– Collection{T} –>
Go Back
ToJson()
Returns a JSON string that contains information about all of the items in the collection.
Return Value
Return Type | Description |
String<!– System.String –> | A string that contains information about all of the items in the collection. |
Parameters
<!– ThinkGeo.MapSuite.MvcEdition.GeoKeyedCollection{T} –>
Go Back
ToString()
Return Value
Return Type | Description |
String<!– System.String –> | |
Parameters
Protected Methods
ChangeItemKey(T, String)
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
Name | Type | Description |
item | T<!– T –> | |
newKey | String<!– System.String –> | |
<!– KeyedCollection{System.String,T} –>
Go Back
ClearItems()
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
<!– Collection{T}(overriden) –>
Go Back
Finalize()
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
GetKeyForItem(T)
When implemented in a derived class, extracts the key from the specified element.
Return Value
Return Type | Description |
String<!– System.String –> | The key for the specified element. |
Parameters
Name | Type | Description |
item | T<!– T –> | The element from which to extract the key. |
<!– KeyedCollection{System.String,T}(overriden) –>
Go Back
InsertItem(Int32, T)
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
Name | Type | Description |
index | Int32<!– System.Int32 –> | |
item | T<!– T –> | |
<!– Collection{T}(overriden) –>
Go Back
MemberwiseClone()
Return Value
Return Type | Description |
Object<!– System.Object –> | |
Parameters
RemoveItem(Int32)
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
Name | Type | Description |
index | Int32<!– System.Int32 –> | |
<!– Collection{T}(overriden) –>
Go Back
SetItem(Int32, T)
Return Value
Return Type | Description |
Void<!– System.Void –> | |
Parameters
Name | Type | Description |
index | Int32<!– System.Int32 –> | |
item | T<!– T –> | |
<!– Collection{T}(overriden) –>
Go Back
Public Properties
Comparer
Return Value
Return Type |
IEqualityComparer<String><!– System.Collections.Generic.IEqualityComparer{System.String} –> |
<!– KeyedCollection{System.String,T} –>
Go Back
Count
Return Value
Return Type |
Int32<!– System.Int32 –> |
<!– Collection{T} –>
Go Back
Item
Return Value
<!– KeyedCollection{System.String,T} –>
Go Back
Item
Return Value
Protected Properties
Dictionary
Return Value
Return Type |
IDictionary<String,T><!– IDictionary{System.String,T} –> |
<!– KeyedCollection{System.String,T} –>
Go Back
Items
Return Value
Return Type |
IList<T><!– IList{T} –> |
<!– Collection{T} –>
Go Back
Public Events