本文整理汇总了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";
}
示例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);
}
示例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);
}
示例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);
}