Class MapSelection.LayerSelection
Represents a layer selection
Inheritance
Implements
Inherited Members
Namespace: OSGeo.MapGuide.MaestroAPI.Mapping
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public class LayerSelection : IList<object[]>, ICollection<object[]>, IEnumerable<object[]>, IEnumerable
Constructors
| Improve this Doc View SourceLayerSelection(RuntimeMapLayer)
Constructs a new LayerSelection with a number of selected featured
Declaration
public LayerSelection(RuntimeMapLayer layer)
Parameters
Type | Name | Description |
---|---|---|
RuntimeMapLayer | layer | The layer to represent |
LayerSelection(RuntimeMapLayer, IEnumerable<Object[]>)
Constructs a new LayerSelection with a number of selected featured
Declaration
public LayerSelection(RuntimeMapLayer layer, IEnumerable<object[]> ids)
Parameters
Type | Name | Description |
---|---|---|
RuntimeMapLayer | layer | The layer to represent |
System.Collections.Generic.IEnumerable<System.Object[]> | ids | The list of composite IDs that the layer supports |
Properties
| Improve this Doc View SourceCount
Returns the number of composite keys (and thus selected objects)
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsReadOnly
Gets a value indicating if the collection is read-only
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[Int32]
Gets or sets the composite key for the specified index
Declaration
public object[] this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index for the composite key |
Property Value
Type | Description |
---|---|
System.Object[] | The composite key |
Layer
Gets the layer that contains the selected objects
Declaration
public RuntimeMapLayer Layer { get; }
Property Value
Type | Description |
---|---|
RuntimeMapLayer |
Methods
| Improve this Doc View SourceAdd(Object[])
Adds a composite key to the selection
Declaration
public void Add(object[] values)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | values | The composite key |
AddFeature(IRecord)
Adds the specified record to the selection
Declaration
public void AddFeature(IRecord record)
Parameters
Type | Name | Description |
---|---|---|
IRecord | record |
AddFeatures(IReader, Int32)
Adds records from the specified reader into this selection
Declaration
public int AddFeatures(IReader reader, int limit)
Parameters
Type | Name | Description |
---|---|---|
IReader | reader | The reader |
System.Int32 | limit | The maximum number of records to add. Specify -1 for all |
Returns
Type | Description |
---|---|
System.Int32 | Number of records added |
AddRange(IEnumerable<Object[]>)
Adds a number of composite keys
Declaration
public void AddRange(IEnumerable<object[]> lst)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Object[]> | lst | A list of composite keys |
Clear()
Removes all composite keys from the collection
Declaration
public void Clear()
Contains(Object[])
Returns a value indicating if the composite key is contained in the collection
Declaration
public bool Contains(object[] item)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | item | The composite key to look for |
Returns
Type | Description |
---|---|
System.Boolean | True if the collection contains the composite key, false otherwise |
CopyTo(Object[][], Int32)
Not implemented
Declaration
public void CopyTo(object[][] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Object[][] | array | |
System.Int32 | arrayIndex |
EncodeIDString(Object[])
Encodes the given combined keyset into an ID string for use in the Xml
Declaration
public string EncodeIDString(object[] values)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | values | The combined key |
Returns
Type | Description |
---|---|
System.String | A base64 encoded ID string |
GetEnumerator()
Returns an enumerator for the collection
Declaration
public IEnumerator<object[]> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Object[]> | An enumerator for the collection |
IndexOf(Object[])
Returns the index of the given composite key
Declaration
public int IndexOf(object[] item)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | item | The composite key to look for |
Returns
Type | Description |
---|---|
System.Int32 | The index of the composite key or -1 if the key is not found |
Insert(Int32, Object[])
Inserts a key at the specified location
Declaration
public void Insert(int index, object[] item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index to insert the key at |
System.Object[] | item | The key to insert |
ParseIDString(String)
Parses a base64 encoded string with key values
Declaration
public object[] ParseIDString(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The base64 encoded ID string |
Returns
Type | Description |
---|---|
System.Object[] | The composite value key |
Remove(Object[])
Removes the given composite key from the collection
Declaration
public bool Remove(object[] item)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | item | The composite key to remove |
Returns
Type | Description |
---|---|
System.Boolean | True if the composite key was found and removed, false otherwise |
RemoveAt(Int32)
Removes the element at the specified location
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the item to remove |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Returns an enumerator for the collection
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An enumerator for the collection |