Microsoft.VisualStudio.Project.ProjectNode.WrapXmlFragment C# (CSharp) Method

WrapXmlFragment() private static method

private static WrapXmlFragment ( XmlDocument document, XmlElement root, Guid flavor, string configuration, string fragment ) : XmlElement
document XmlDocument
root XmlElement
flavor Guid
configuration string
fragment string
return XmlElement
        private static XmlElement WrapXmlFragment(XmlDocument document, XmlElement root, Guid flavor, string configuration, string fragment)
        {
            XmlElement node = document.CreateElement(ProjectFileConstants.FlavorProperties);
            XmlAttribute attribute = document.CreateAttribute(ProjectFileConstants.Guid);
            attribute.Value = flavor.ToString("B");
            node.Attributes.Append(attribute);
            if (!String.IsNullOrEmpty(configuration))
            {
                attribute = document.CreateAttribute(ProjectFileConstants.Configuration);
                attribute.Value = configuration;
                node.Attributes.Append(attribute);
            }
            node.InnerXml = fragment;
            root.AppendChild(node);
            return node;
        }
ProjectNode