コード例 #1
0
        public Launcher()
        {
            IISModel model = IISModel.LoadFromFile(DefaultFeaturesFile);

            Commands  = Configurator.CreateCommands(model);
            AutoClose = YesNo.No;
        }
コード例 #2
0
ファイル: IISSamples.cs プロジェクト: iAJTin/iIIS
        // 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();
        }