Interface IFeatureReader
Provides a forward-only, read-only iterator for reading features selected from a feature source
Inherited Members
System.IDisposable.Dispose()
System.Collections.Generic.IEnumerable<OSGeo.MapGuide.MaestroAPI.Feature.IFeature>.GetEnumerator()
Namespace: OSGeo.MapGuide.MaestroAPI.Feature
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public interface IFeatureReader : IReader, IDisposable, IFeature, IRecord, IEnumerable<IFeature>, IEnumerable
Remarks
- You must call ReadNext before you can access the data
- For each property, determine the property type and then call the appropriate Get<type>() method to get the value of the property.
- The exception for this is if you are access the value via the indexer. In this case you only need determine the property type when casting from the System.Object that is returned by the indexer
Examples
How an IFeatureReader is normally used
IServerConnection conn = ConnectionProviderRegistry.CreateConnection("Maestro.Http",
"Username", "Administrator",
"Password", "admin",
"Url", "http://localhost/mapguide/mapagent/mapagent.fcgi");
using (IFeatureReader reader = conn.FeatureService.QueryFeatureSource("Library://Test/Parcels.FeatureSource", "Default:Parcels", null))
{
while (reader.ReadNext())
{
//Process the current feature
}
reader.Close();
}