GetShowconfig() private method

private GetShowconfig ( bool normalize = false ) : XmlDocument
normalize bool
return XmlDocument
        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);
        }
        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);
        }
        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);
        }