public Launcher() { IISModel model = IISModel.LoadFromFile(DefaultFeaturesFile); Commands = Configurator.CreateCommands(model); AutoClose = YesNo.No; }
public IISModel GetIISInformation() { IISModel model = new IISModel(); model.ApplicationPoolsList = GetApplicationPools(); model.SiteList = GetSites(); model.SyncTime = DateTime.Now; }
// 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(); }
/// <summary> /// Returns a new <see cref="FeatureCommandsCollection"/> reference from <b>Internet Information Services (IIS)</b> <see cref="IISModel"/> (<b>XML</b> model). /// </summary> /// <param name="model">Features array</param> /// <param name="commandOptions">Command options</param> /// <returns> /// A <see cref="FeatureCommandsCollection"/> reference. /// </returns> public static FeatureCommandsCollection CreateCommands(IISModel model, CommandOptions commandOptions = null) { if (model == null) { return(new FeatureCommandsCollection()); } var features = new Collection <IISFeature>(); foreach (var feature in model.Configuration.Features) { features.Add(feature.Name); } return(CreateCommandsImpl(features, commandOptions ?? CommandOptions.SilentModeActivated)); }
private void Monitor() { IISModel iisModel = MonitorAction.Instance().GetIISInformation(); }