コード例 #1
0
ファイル: FanArtCache.cs プロジェクト: zeroxist/MediaPortal-2
 protected void Init()
 {
     _fanArtSync            = new KeyedAsyncReaderWriterLock <Guid>();
     _fanArtCounts          = new AsyncStaticTimeoutCache <string, FanArtCount>(FANART_COUNT_TIMEOUT);
     _maxFanArtCounts       = new Dictionary <string, int>();
     _settingsChangeWatcher = new SettingsChangeWatcher <FanArtSettings>();
     _settingsChangeWatcher.SettingsChanged += SettingsChanged;
     LoadSettings();
 }
コード例 #2
0
        protected void Init()
        {
            if (!Directory.Exists(FANART_CACHE_PATH))
            {
                Directory.CreateDirectory(FANART_CACHE_PATH);
            }

            _fanArtSync      = new KeyedAsyncReaderWriterLock <Guid>();
            _fanArtCounts    = new AsyncStaticTimeoutCache <string, FanArtCount>(FANART_COUNT_TIMEOUT);
            _maxFanArtCounts = new Dictionary <string, int>();

            _settingsChangeWatcher = new SettingsChangeWatcher <FanArtSettings>();
            _settingsChangeWatcher.SettingsChanged += SettingsChanged;
            LoadSettings();
        }