Esempio n. 1
0
 public void Save(UsageStore store)
 {
     try
     {
         var json = store.ToJson(lowerCase: true);
         path.WriteAllText(json, Encoding.UTF8);
     }
     catch (Exception ex)
     {
         LogHelper.Instance.Error(ex, "SaveUsage Error: \"{0}\"", path);
     }
 }
Esempio n. 2
0
        private void SaveUsage(UsageStore store)
        {
            var pathString = storePath.ToString();

            Logger.Trace("SaveUsage: \"{0}\"", pathString);

            try
            {
                var json = store.ToJson();
                storePath.WriteAllText(json, Encoding.UTF8);
            }
            catch (Exception ex)
            {
                Logger.Error(ex, "SaveUsage Error: \"{0}\"", pathString);
            }
        }