Esempio n. 1
0
        static void Execute(string file, ConfigureNode node, Configuration configuration)
        {
            var document = node.LoadDocument(file);

            if (document != null)
            {
                var changed = node.ApplyActions(document);
                if (changed)
                {
                    try
                    {
                        // Don't save file in dry-run, but do *everything* else
                        if (!configuration.DryRun)
                        {
                            document.Save(file);
                        }

                        Log.Info($"  {file}", ConsoleColor.Green);
                    }
                    catch (Exception ex)
                    {
                        Log.Error(ex);
                    }
                }
                else
                {
                    Log.Info($"  {file}");
                }
            }
        }
Esempio n. 2
0
 public Configuration()
 {
     Nodes = new ConfigureNode[0];
 }