private AppPoolInfo GetAppPoolInfo() { var netFramework = NetFramework; Assert.IsNotNull(netFramework, nameof(netFramework)); var framework = netFramework.SelectedValue.ToString(); var frameworkArr = framework.Split(' '); Assert.IsTrue(frameworkArr.Length > 0, "impossible"); var force32Bit = frameworkArr.Length == 2; var mode = Mode; Assert.IsNotNull(mode, nameof(mode)); var modeItem = (ListBoxItem)mode.SelectedValue; Assert.IsNotNull(modeItem, nameof(modeItem)); var isClassic = ((string)modeItem.Content).EqualsIgnoreCase("Classic"); var appPoolInfo = new AppPoolInfo { FrameworkVersion = frameworkArr[0].EmptyToNull() ?? "v2.0", Enable32BitAppOnWin64 = force32Bit, ManagedPipelineMode = !isClassic }; return(appPoolInfo); }
public AppPoolInfoModel(AppPoolInfo info) : this() { Name = info.Name; State = info.State; enable32BitAppOnWin64 = info.enable32BitAppOnWin64; managedPipelineMode = info.managedPipelineMode; managedRuntimeVersion = info.managedRuntimeVersion; }
void IWizardStep.InitializeStep(WizardArgs wizardArgs) { Init(); locationFolder.Text = ProfileManager.Profile.InstancesFolder; ProductName.DataContext = _StandaloneProducts.GroupBy(p => p.Name); var args = (InstallWizardArgs)wizardArgs; _InstallParameters = args; Product product = args.Product; if (product != null) { Select(ProductName, product.Name); Select(ProductVersion, product.ShortVersion); Select(ProductRevision, product.Revision); } else { SelectFirst(ProductName); } AppPoolInfo info = args.InstanceAppPoolInfo; if (info != null) { var frameworkValue = $"{info.FrameworkVersion} {(info.Enable32BitAppOnWin64 ? "32bit" : string.Empty)}"; SelectByValue(NetFramework, frameworkValue); SelectByValue(Mode, info.ManagedPipelineMode ? "Integrated" : "Classic"); } var name = args.InstanceName; if (!string.IsNullOrEmpty(name)) { InstanceName.Text = name; } var rootName = args.InstanceRootName; if (!string.IsNullOrEmpty(rootName)) { RootName.Text = rootName; } var hostNames = args.InstanceHostNames; if (hostNames != null && hostNames.Any()) { HostNames.Text = string.Join("\r\n", hostNames); } if (rootName == null) { return; } var location = args.InstanceRootPath.TrimEnd(rootName).Trim('/', '\\'); if (!string.IsNullOrEmpty(location)) { locationFolder.Text = location; } }
void ICrosswalkModule.BindAppPoolInfo(ref AppPoolInfo info) { _BindAppPoolInfo(ref info); }
static extern void _BindAppPoolInfo(ref AppPoolInfo info);
void IWizardStep.InitializeStep(WizardArgs wizardArgs) { this.Init(); this.locationFolder.Text = ProfileManager.Profile.InstancesFolder; this.ProductName.DataContext = this.standaloneProducts.GroupBy(p => p.Name); var args = (InstallWizardArgs)wizardArgs; this.installParameters = args; Product product = args.Product; if (product != null) { this.Select(this.ProductName, product.Name); this.Select(this.ProductVersion, product.ShortVersion); this.Select(this.ProductRevision, product.Revision); } else { this.SelectFirst(this.ProductName); } AppPoolInfo info = args.InstanceAppPoolInfo; if (info != null) { var frameworkValue = info.FrameworkVersion + " " + (info.Enable32BitAppOnWin64 ? "32bit" : string.Empty); this.SelectByValue(this.NetFramework, frameworkValue); this.SelectByValue(this.Mode, info.ManagedPipelineMode ? "Integrated" : "Classic"); } string name = args.InstanceName; if (!string.IsNullOrEmpty(name)) { this.InstanceName.Text = name; } string rootName = args.InstanceRootName; if (!string.IsNullOrEmpty(rootName)) { this.RootName.Text = rootName; } string host = args.InstanceHost; if (!string.IsNullOrEmpty(host)) { this.HostName.Text = host; } if (rootName != null) { string location = args.InstanceRootPath.TrimEnd(rootName).Trim(new[] { '/', '\\' }); if (!string.IsNullOrEmpty(location)) { this.locationFolder.Text = location; } } }