Exemplo n.º 1
0
        public static void SetInstance(RegistrationCache cache)
        {
            if (_cache != null)
            {
                return;
            }

            lock (_locker)
                if (_cache == null)
                {
                    _cache = cache;
                }
        }
Exemplo n.º 2
0
 public static void SaveCacheToFile(RegistrationCache cache, string fileName)
 {
     File.WriteAllText(fileName, JsonConvert.SerializeObject(cache, Newtonsoft.Json.Formatting.Indented));
 }