public IconCache LoadCache() { Monitor.Enter(_syncRoot); Stream streamRead = File.OpenRead(CommonInfo.PluginsFolder); BinaryFormatter binaryRead = new BinaryFormatter(); IconCache cache = (IconCache)binaryRead.Deserialize(streamRead); streamRead.Close(); Monitor.Exit(_syncRoot); streamRead = null; binaryRead = null; return(cache); }
public IconCache(IconCache cache) { _names = new List <string>(cache.Names); _icons = new Dictionary <string, Image>(cache.Icons); _syncRoot = new Object(); }
private IconManager() { _cache = new IconCache(); }
public void Load() { _cache = LoadCache(); }