当前位置: 首页>>代码示例>>C#>>正文


C# Instance.GetWebResultConfig方法代码示例

本文整理汇总了C#中SIM.Instances.Instance.GetWebResultConfig方法的典型用法代码示例。如果您正苦于以下问题:C# Instance.GetWebResultConfig方法的具体用法?C# Instance.GetWebResultConfig怎么用?C# Instance.GetWebResultConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SIM.Instances.Instance的用法示例。


在下文中一共展示了Instance.GetWebResultConfig方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReinstallArgs

        public ReinstallArgs(Instance instance, SqlConnectionStringBuilder connectionString, string license, string webServerIdentity, bool serverSideRedirect)
        {
            this.ConnectionString = connectionString;
              this.Name = instance.Name;
              this.Bindings = instance.Bindings;
              this.Product = instance.Product;
              this.WebRootPath = instance.WebRootPath;
              this.RootPath = instance.RootPath;
              this.DataFolderPath = instance.DataFolderPath;
              this.DatabasesFolderPath = Path.Combine(this.RootPath, "Databases");
              this.WebServerIdentity = webServerIdentity;
              this.LicenseFilePath = license;
              this.Modules = new Product[0];
              this.IsClassic = instance.IsClassic;
              this.Is32Bit = instance.Is32Bit;
              this.ForceNetFramework4 = instance.IsNetFramework4;
              this.ServerSideRedirect = serverSideRedirect;
              this.TempFolder = Path.Combine(this.RootPath, "Temp");
              this.InstanceDatabases = instance.AttachedDatabases;
              this.instanceName = instance.Name;
              this.StopInstance = instance.Stop;
              this.WebsiteID = instance.ID;

              var executionTimeout = UpdateWebConfigHelper.GetHttpRuntime(instance.GetWebResultConfig()).GetAttribute("executionTimeout");
              this.IncreaseExecutionTimeout = string.IsNullOrEmpty(executionTimeout) || executionTimeout != "600";
        }
开发者ID:Sitecore,项目名称:Sitecore-Instance-Manager,代码行数:26,代码来源:ReinstallArgs.cs

示例2: OnClick

        public void OnClick(Window mainWindow, Instance instance)
        {
            if (!this.Showconfig && !this.WebConfigResult)
              {
            RunConfigApp("Sitecore.ConfigBuilder.Tool.exe", mainWindow, instance != null ? Path.Combine(instance.WebRootPath, "web.config") : null);
            return;
              }

              var folder = Path.Combine(ApplicationManager.TempFolder, "configs", instance.Name);
              if (!Directory.Exists(folder))
              {
            Directory.CreateDirectory(folder);
              }

              string path;
              if (this.Showconfig)
              {
            path = Path.Combine(folder, "showconfig.xml");
              }
              else if (this.WebConfigResult)
              {
            path = Path.Combine(folder, "web.config.result.xml");
              }
              else
              {
            throw new NotSupportedException("This is not supported");
              }

              if (this.Normalize)
              {
            path += ".normalized.xml";
              }

              if (this.Showconfig)
              {
            instance.GetShowconfig(this.Normalize).Save(path);
              }
              else if (this.WebConfigResult)
              {
            instance.GetWebResultConfig(this.Normalize).Save(path);
              }
              else
              {
            Assert.IsTrue(false, "Impossible");
              }

              WindowHelper.OpenFile(path);
        }
开发者ID:alienlab,项目名称:Sitecore-Instance-Manager-Lite,代码行数:48,代码来源:ConfigBuilderButton.cs

示例3: OnClick

        public void OnClick(Window mainWindow, Instance instance)
        {
            if (!this.Showconfig && !this.WebConfigResult)
              {
            var param = instance != null ? Path.Combine(instance.WebRootPath, "web.config") : null;
            RunApp(mainWindow, param);

            return;
              }

              Assert.IsNotNull(instance, "instance");

              var folder = Path.Combine(ApplicationManager.TempFolder, "configs", instance.Name);
              if (!Directory.Exists(folder))
              {
            Directory.CreateDirectory(folder);
              }

              string path;
              if (this.Showconfig)
              {
            path = Path.Combine(folder, "showconfig.xml");
              }
              else if (this.WebConfigResult)
              {
            path = Path.Combine(folder, "web.config.result.xml");
              }
              else
              {
            throw new NotSupportedException("This is not supported");
              }

              if (this.Normalize)
              {
            path = Path.Combine(Path.GetDirectoryName(path), "norm." + Path.GetFileName(path));
              }

              if (this.Showconfig)
              {
            instance.GetShowconfig(this.Normalize).Save(path);
              }
              else if (this.WebConfigResult)
              {
            instance.GetWebResultConfig(this.Normalize).Save(path);
              }
              else
              {
            throw new NotImplementedException("This is not supported #2");
              }

              CoreApp.OpenFile(path);
        }
开发者ID:Sitecore,项目名称:Sitecore-Instance-Manager,代码行数:52,代码来源:ConfigBuilderButton.cs

示例4: OnClick

        public void OnClick(Window mainWindow, Instance instance)
        {
            if (!this.Showconfig && !this.WebConfigResult)
              {
            RunConfigApp("Sitecore.ConfigBuilder.Tool.exe", mainWindow, instance != null ? Path.Combine(instance.WebRootPath, "web.config") : null);
            return;
              }

              var path = instance.GetWebConfig().FilePath;

              if (this.Showconfig)
              {
            path = Path.Combine(Path.GetDirectoryName(path), "showconfig.xml");
              }
              else if (this.WebConfigResult)
              {
            path += ".result.xml";
              }
              else
              {
            Assert.IsTrue(false, "Impossible");
              }

              if (this.Normalize)
              {
            path += ".normalized.xml";
              }

              if (this.Showconfig)
              {
            instance.GetShowconfig(this.Normalize).Save(path);
              }
              else if (this.WebConfigResult)
              {
            instance.GetWebResultConfig(this.Normalize).Save(path);
              }
              else
              {
            Assert.IsTrue(false, "Impossible");
              }

              WindowHelper.OpenFile(path);
        }
开发者ID:steviemcg,项目名称:Sitecore-Instance-Manager,代码行数:43,代码来源:ConfigBuilderButton.cs


注:本文中的SIM.Instances.Instance.GetWebResultConfig方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。