public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { List <IFuturePrototype> list = new List <IFuturePrototype>(); list.Add(parameterType.GetSizeParameter()); foreach (SourceMap current in layer) { if (current.ReadyToLock()) { IDisplayableSource displayableSource = mapTileSourceFactory.CreateDisplayableWarpedSource(current); list.Add(displayableSource.GetImagePrototype(parameterType, features)); } } IFuturePrototype futurePrototype = new ApplyPrototype(new CompositeImageVerb(), list.ToArray()); if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { futurePrototype = new DiskCachePrototype(mapTileSourceFactory.GetCachePackage().diskCache, futurePrototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { futurePrototype = new MemCachePrototype(mapTileSourceFactory.GetCachePackage().computeCache, futurePrototype); } return(futurePrototype); }
internal IFuturePrototype AddAsynchrony(IFuturePrototype prototype, FutureFeatures features) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)) { D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached), "should always cache async stuff, I think."); prototype = new MemCachePrototype(this.cachePackage.asyncCache, new OpenDocumentSensitivePrioritizedPrototype(this.cachePackage.openDocumentPrioritizer, new Asynchronizer(this.cachePackage.computeAsyncScheduler, prototype), this.GetOpenDocumentFuture(FutureFeatures.MemoryCached))); } return(prototype); }
public IFuturePrototype GetImageDetailPrototype(FutureFeatures features) { IFuturePrototype prototype = this.GetAccessPrototype(AccessMethod.ImageDetail, FutureFeatures.Cached, new IFuturePrototype[] { new UnevaluatedTerm(TermName.ImageDetail) }); if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { prototype = new MemCachePrototype(this.cachePackage.computeCache, prototype); } return this.AddAsynchrony(prototype, features); }
internal IFuturePrototype AddCaching(IFuturePrototype prototype, FutureFeatures features) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { prototype = new DiskCachePrototype(this.cachePackage.diskCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { prototype = new MemCachePrototype(this.cachePackage.computeCache, prototype); } return(prototype); }
public IFuturePrototype GetImageDetailPrototype(FutureFeatures features) { IFuturePrototype prototype = GetAccessPrototype(AccessMethod.ImageDetail, FutureFeatures.Cached, new IFuturePrototype[] { new UnevaluatedTerm(TermName.ImageDetail) }); if (HasFeature(features, FutureFeatures.MemoryCached)) { prototype = new MemCachePrototype(cachePackage.computeCache, prototype); } return(AddAsynchrony(prototype, features)); }
internal IFuturePrototype AddCaching(IFuturePrototype prototype, FutureFeatures features) { if (HasFeature(features, FutureFeatures.DiskCached)) { prototype = new DiskCachePrototype(cachePackage.diskCache, prototype); } if (HasFeature(features, FutureFeatures.MemoryCached)) { prototype = new MemCachePrototype(cachePackage.computeCache, prototype); } return(prototype); }
public static IFuturePrototype AddFeatures(IFuturePrototype prototype, FutureFeatures features, CachePackage cachePackage) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { prototype = new DiskCachePrototype(cachePackage.diskCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Cached)) { prototype = new MemCachePrototype(cachePackage.networkCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)) { prototype = new MemCachePrototype(cachePackage.asyncCache, new Asynchronizer(cachePackage.networkAsyncScheduler, prototype)); } return(prototype); }
public static IFuturePrototype AddFeatures(IFuturePrototype prototype, FutureFeatures features, CachePackage cachePackage) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { prototype = new DiskCachePrototype(cachePackage.diskCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Cached)) { prototype = new MemCachePrototype(cachePackage.networkCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)) { prototype = new MemCachePrototype(cachePackage.asyncCache, new Asynchronizer(cachePackage.networkAsyncScheduler, prototype)); } return prototype; }
public IFuturePrototype GetImagePrototype(ImageParameterTypeIfc parameterType, FutureFeatures features) { List<IFuturePrototype> list = new List<IFuturePrototype>(); list.Add(parameterType.GetSizeParameter()); foreach (SourceMap current in this.layer) { if (current.ReadyToLock()) { IDisplayableSource displayableSource = this.mapTileSourceFactory.CreateDisplayableWarpedSource(current); list.Add(displayableSource.GetImagePrototype(parameterType, features)); } } IFuturePrototype futurePrototype = new ApplyPrototype(new CompositeImageVerb(), list.ToArray()); if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { futurePrototype = new DiskCachePrototype(this.mapTileSourceFactory.GetCachePackage().diskCache, futurePrototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { futurePrototype = new MemCachePrototype(this.mapTileSourceFactory.GetCachePackage().computeCache, futurePrototype); } return futurePrototype; }
internal IFuturePrototype AddAsynchrony(IFuturePrototype prototype, FutureFeatures features) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.Async)) { D.Assert(UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached), "should always cache async stuff, I think."); prototype = new MemCachePrototype(this.cachePackage.asyncCache, new OpenDocumentSensitivePrioritizedPrototype(this.cachePackage.openDocumentPrioritizer, new Asynchronizer(this.cachePackage.computeAsyncScheduler, prototype), this.GetOpenDocumentFuture(FutureFeatures.MemoryCached))); } return prototype; }
internal IFuturePrototype AddCaching(IFuturePrototype prototype, FutureFeatures features) { if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.DiskCached)) { prototype = new DiskCachePrototype(this.cachePackage.diskCache, prototype); } if (UnwarpedMapTileSource.HasFeature(features, FutureFeatures.MemoryCached)) { prototype = new MemCachePrototype(this.cachePackage.computeCache, prototype); } return prototype; }