Exemplo n.º 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>()
             };
         }
     }
 }
Exemplo n.º 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>() };
         }
     }
 }