internal ColorMapCacheItem GetColorMapCacheItem(ColorMapKey key) { lock (_syncLock) { if (_colorMapCache.ContainsKey(key)) { return(_colorMapCache[key]); } ColorMapCacheItem item = new ColorMapCacheItem(key); _colorMapCache[key] = item; return(item); } }
public override object CreateMemento() { //no state to remember, but we do want to remove the reference to the 'real lut'. It will be recreated later. _cacheItem = null; return(base.CreateMemento()); }