Beispiel #1
0
        public async void Dispose()
        {
            await Task.Delay(TimeSpan.FromMinutes(1d));

            if (--_referenceCount > 0)
            {
                return;
            }
            _watcher?.Dispose();
            Configs?.Dispose();
            _instance = null;
        }
Beispiel #2
0
 public static PatchSettingsModel Create()
 {
     if (_instance == null)
     {
         _instance       = new PatchSettingsModel();
         _referenceCount = 1;
     }
     else
     {
         ++_referenceCount;
     }
     return(_instance);
 }