User Tools

Site Tools


thinkgeo.mapsuite.mvcedition.geokeyedcollection_t

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.

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

Members Summary

Public Constructors

Name Parameters DeclaringType Summary
Public MethodGeoKeyedCollection‹T› Initializes a new instance of the GeoKeyedCollection class.

Protected Constructors

Name Parameters DeclaringType Summary

Public Methods

Name Parameters DeclaringType Summary
Public MethodAdd T Collection<T>
Public MethodClear Collection<T>
Public MethodContains String KeyedCollection<String,T>
Public MethodContains T Collection<T>
Public MethodCopyTo T[], Int32 Collection<T>
Public MethodEquals Object Object
Public MethodFromJson String GeoKeyedCollection<T> Load this object from a json string.
Public MethodGetEnumerator Collection<T>
Public MethodGetHashCode Object
Public MethodGetType Object
Public MethodIndexOf T Collection<T>
Public MethodInsert Int32, T Collection<T>
Public MethodRemove T Collection<T>
Public MethodRemove String KeyedCollection<String,T>
Public MethodRemoveAt Int32 Collection<T>
Public MethodToJson GeoKeyedCollection<T> Returns a JSON string that contains information about all of the items in the collection.
Public MethodToString Object

Protected Methods

Name Parameters DeclaringType Summary
Protected MethodChangeItemKey T, String KeyedCollection<String,T>
Protected MethodClearItems Collection<T>(overriden)
Protected MethodFinalize Object
Protected MethodGetKeyForItem T KeyedCollection<String,T>(overriden) When implemented in a derived class, extracts the key from the specified element.
Protected MethodInsertItem Int32, T Collection<T>(overriden)
Protected MethodMemberwiseClone Object
Protected MethodRemoveItem Int32 Collection<T>(overriden)
Protected MethodSetItem Int32, T Collection<T>(overriden)

Public Properties

Name Return DeclaringType Summary
Public PropertyComparer IEqualityComparer<String> KeyedCollection<String,T>
Public PropertyCount Int32 Collection<T>
Public PropertyItem T KeyedCollection<String,T>
Public PropertyItem T Collection<T>

Protected Properties

Name Return DeclaringType Summary
Protected PropertyDictionary IDictionary<String,T> KeyedCollection<String,T>
Protected PropertyItems IList<T> Collection<T>

Public Events

Name Event Arguments DeclaringType Summary

Public Constructors

GeoKeyedCollection‹T›()

Initializes a new instance of the GeoKeyedCollection class.

Parameters

Name Type Description

Go Back

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

Name Type Description

<!– Collection{T} –> Go Back

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

Name Type Description
array T[]<!– Tthinkgeo.mapsuite.mvcedition.geokeyedcollection_t –>
index Int32<!– System.Int32 –>

<!– Collection{T} –> Go Back

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

Name Type Description

<!– Collection{T} –> Go Back

GetHashCode()

Return Value

Return Type Description
Int32<!– System.Int32 –>

Parameters

Name Type Description

<!– System.Object –> Go Back

GetType()

Return Value

Return Type Description
Type<!– System.Type –>

Parameters

Name Type Description

<!– System.Object –> Go Back

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

Name Type Description

<!– ThinkGeo.MapSuite.MvcEdition.GeoKeyedCollection{T} –> Go Back

ToString()

Return Value

Return Type Description
String<!– System.String –>

Parameters

Name Type Description

<!– System.Object –> Go Back

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

Name Type Description

<!– Collection{T}(overriden) –> Go Back

Finalize()

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description

<!– System.Object –> Go Back

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

Name Type Description

<!– System.Object –> Go Back

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

Return Type
T<!– T –>

<!– KeyedCollection{System.String,T} –> Go Back

Item

Return Value

Return Type
T<!– T –>

<!– Collection{T} –> Go Back

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

thinkgeo.mapsuite.mvcedition.geokeyedcollection_t.txt · Last modified: 2017/03/16 21:59 (external edit)