Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
		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 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;
		}