public void RemoveFromCache(IMapRequestConfig config) { if (ExistsInCache(config)) { Cache.Remove(config.CacheKey); } }
protected virtual void CleanUpRequest() { UnwireEvents(); if (_renderer != null) { _renderer.Dispose(); } _renderer = null; if (MapView != null) { MapView.Map = null; MapView.Dispose(); } MapView = null; if (Map != null) { Map.Dispose(); } Map = null; Context = null; _config = null; _renderer = null; }
private void EnsureMapConfiguration() { if (_config == null) { RaiseCreateMapRequestConfig(); _config = ConfigFactory.CreateConfig(Context); RaiseMapRequestConfigCreated(); } }
public void SaveToCache(IMapRequestConfig config, Stream data) { data.Position = 0; byte[] b; BinaryReader br = new BinaryReader(data); b = br.ReadBytes((int)data.Length); data.Position = 0; Cache.Insert(config.CacheKey, b, null, Cache.NoAbsoluteExpiration, CacheTime); }
public System.IO.Stream RetrieveStream(IMapRequestConfig config) { if (ExistsInCache(config)) { byte[] bytes = (byte[])Cache[config.CacheKey]; MemoryStream ms = new MemoryStream(bytes); ms.Position = 0; return(ms); } throw new NullReferenceException("Cache Miss"); }
public System.IO.Stream RetrieveStream(IMapRequestConfig config) { if (ExistsInCache(config)) { byte[] bytes = (byte[])Cache[config.CacheKey]; MemoryStream ms = new MemoryStream(bytes); ms.Position = 0; return ms; } throw new NullReferenceException("Cache Miss"); }
public Stream RetrieveStream(IMapRequestConfig config) { ///we should be testing ExistsInCache before calling this method. throw new InvalidOperationException(); }
public void SaveToCache(IMapRequestConfig config, Stream data) { //do nothing }
public bool ExistsInCache(IMapRequestConfig config) { return false; }
public void RemoveFromCache(IMapRequestConfig config) { //do nothing }
public void RemoveFromCache(IMapRequestConfig config) { if (ExistsInCache(config)) Cache.Remove(config.CacheKey); }
public Stream RetrieveStream(IMapRequestConfig config) { return(RetrieveStream((TMapRequestConfig)config)); }
public void SaveToCache(IMapRequestConfig config, Stream data) { SaveToCache((TMapRequestConfig)config, data); }
public bool ExistsInCache(IMapRequestConfig config) { return(ExistsInCache((TMapRequestConfig)config)); }
public void ConfigureRenderer(IMapRequestConfig requestConfig, IMapRenderer renderer) { ConfigureRenderer((BasicMapRequestConfig)requestConfig, (DefaultImageRenderer)renderer); }
public bool ExistsInCache(IMapRequestConfig config) { return(Cache[config.CacheKey] != null); }
public bool ExistsInCache(IMapRequestConfig config) { return Cache[config.CacheKey] != null; }
public void ConfigureRenderer(IMapRequestConfig requestConfig, IMapRenderer renderer) { ConfigureRenderer((WmsMapRequestConfig)requestConfig, (WmsRenderer)renderer); }
public void RemoveFromCache(IMapRequestConfig config) { RemoveFromCache((TMapRequestConfig)config); }
public bool ExistsInCache(IMapRequestConfig config) { return(false); }