Ejemplo n.º 1
0
 public async Task StoreConfigurationStatusAsync(ConfigurationPersistenceContext context)
 {
     for (int i = 0; i < this.scriptResults.Configuration?.Count; i++)
     {
         await context.SetConfigurationStatusAsync(
             AH.CoalesceString(this.scriptResults.Configuration[i].ConfigType, "PSConfig"),
             this.scriptResults.Configuration[i].ConfigKey,
             this.comparisonResults[i] == null?ConfigurationStatus.Current : ConfigurationStatus.Drifted);
     }
 }
Ejemplo n.º 2
0
 public override async Task PersistAsync(ConfigurationPersistenceContext context)
 {
     if (this.scriptResults.Configuration != null)
     {
         foreach (var config in this.scriptResults.Configuration)
         {
             var keyValueConfig = new KeyValueConfiguration
             {
                 Type  = AH.CoalesceString(config.ConfigType, "PSConfig"),
                 Key   = config.ConfigKey,
                 Value = config.CurrentConfigValue.ToString()
             };
             await keyValueConfig.PersistAsync(context);
         }
     }
 }
Ejemplo n.º 3
0
 public override Task StoreConfigurationStatusAsync(PersistedConfiguration actual, ComparisonResult results, ConfigurationPersistenceContext context)
 => this.collectedConfiguration.StoreConfigurationStatusAsync(context);