public void Save(XmlWriter xmlWriter, string sectionName) { Assert.IsNotNull(xmlWriter); Assert.IsNotNull(sectionName); xmlWriter.WriteStartElement(sectionName); ConfigurationWriter.Write(xmlWriter, RootNode.Attributes); foreach (var childNode in RootNode.ChildNodes) { ConfigurationWriter.WriteNode(xmlWriter, childNode); } xmlWriter.WriteEndElement(); }
private void Copy_Click(object sender, EventArgs e) { var stringWriter = new StringWriter(); var xmlTextWriter = new XmlTextWriter(stringWriter) { Formatting = Formatting.Indented }; foreach (var node in SelectedConfigurationNodes) { ConfigurationWriter.WriteNode(xmlTextWriter, node); } var s = stringWriter.ToString(); Clipboard.SetText(s); }
private void Copy_Click(object sender, EventArgs e) { var stringWriter = new StringWriter(); var xmlTextWriter = new XmlTextWriter(stringWriter); xmlTextWriter.Formatting = Formatting.Indented; foreach (var node in SelectedConfigurationNodes) { var connectionProperties = new ConnectionProperties(); connectionProperties.Load(node); ConfigurationWriter.WriteNode(xmlTextWriter, node); } var s = stringWriter.ToString(); Clipboard.SetText(s); }