예제 #1
0
 internal static void GetOrCreateConsolidatedFile()
 {
     if (consolidatedWrapper == null)
     {
         if (File.Exists(GetConsolidatedFileName()))
         {
             var content = File.ReadAllText(GetConsolidatedFileName());
             if (EncryptFiles())
             {
                 content = content.Decrypt(LocalEncryptionKey);
             }
             consolidatedWrapper = JsonConvert.DeserializeObject <ConsolidatedConfigWrapperFile>(content);
         }
         else
         {
             consolidatedWrapper = new ConsolidatedConfigWrapperFile {
                 ConfigWrappers = new Dictionary <string, ConfigWrapper>(), Users = new Dictionary <string, User>()
             };
         }
     }
 }
예제 #2
0
 internal static void GetOrCreateConsolidatedFile()
 {
    
     if (consolidatedWrapper == null)
     {
         if (File.Exists(GetConsolidatedFileName()))
         {
             var content = File.ReadAllText(GetConsolidatedFileName());
             if (EncryptFiles())
             {
                 content = content.Decrypt(LocalEncryptionKey);
             }
             consolidatedWrapper = JsonConvert.DeserializeObject<ConsolidatedConfigWrapperFile>(content);
         }
         else
         {
             consolidatedWrapper = new ConsolidatedConfigWrapperFile { ConfigWrappers = new Dictionary<string, ConfigWrapper>(), Users = new Dictionary<string, User>() };
         }
     }
 }