public Launcher() { IISModel model = IISModel.LoadFromFile(DefaultFeaturesFile); Commands = Configurator.CreateCommands(model); AutoClose = YesNo.No; }
// Configures IIS features from XML configuration file public static void ExecuteFromXmlFile() { Console.WriteLine(); Console.WriteLine($@"> Configures IIS features from XML configuration file"); IISModel model = IISModel.LoadFromFile("~\\resources\\IIS-Features.xml"); FeatureCommandsCollection commands = Configurator.CreateCommands(model, CommandOptions.SilentModeDeactivated); commands.NotifyFeatureCommandCollectionExecuting += NotifyFeatureCommandCollectionExecuting; commands.NotifyFeatureCommandCollectionExecuted += NotifyFeatureCommandCollectionExecuted; commands.NotifyFeatureCommandsCollectionStart += NotifyFeatureCommandsCollectionStart; commands.NotifyFeatureCommandsCollectionFinish += NotifyFeatureCommandsCollectionFinish; commands.Process(); }