static public void ReleaseCachedFeatureCollection(ICachedFeatureCollection cachedFeatureColledion) { CachedFeatureCollection collection = cachedFeatureColledion as CachedFeatureCollection; if (collection != null) { collection.Released = true; } }
private IFeatureCursor GetFeatures(Guid guid, IQueryFilter filter) { ICachedFeatureCollection collection = FeatureCache.GetUsableFeatureCollection(guid, filter); if (collection != null) { return(collection.FeatureCursor(filter)); } else { FeatureCache.RemoveFeatureCollection(guid); collection = FeatureCache.CreateCachedFeatureCollection(guid, filter); return(new CachingFeatureCursor(collection, this.FeatureCursor(filter))); } }
static public void RemoveFeatureCollection(ICachedFeatureCollection collection) { Guid guid = new Guid(); bool found = false; foreach (Guid g in _collections.Keys) { if (_collections[g] == collection) { guid = g; found = true; } } if (found) { RemoveFeatureCollection(guid); } }
public IFeatureCursor GetSelectedFeatures(IDisplay display) { ICachedFeatureCollection collection = FeatureCache.GetCachedFeatureCollection(this._selectionGUID); if (collection == null) { return(null); } if (display != null) { SpatialFilter filter = new SpatialFilter(); filter.SpatialRelation = spatialRelation.SpatialRelationMapEnvelopeIntersects; filter.Geometry = display.Envelope; filter.FilterSpatialReference = display.SpatialReference; return(collection.FeatureCursor(filter)); } else { return(collection.FeatureCursor()); } }
public CachingFeatureCursor(ICachedFeatureCollection cfCollection, IFeatureCursor cursor) { _cursor = cursor; _cfCollection = cfCollection; }