diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-09-20 21:18:59 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-09-21 08:06:22 -0700 |
commit | bbe3f9cc9c8a1e5909273c1a162a63ea7a66afd8 (patch) | |
tree | c91f66e642c4d26fca266e226b3f2765f546d700 /tools/Sandcastle/Source/BuildAssembler/BuildComponents/CloneComponent.cs | |
parent | 627014f0bbc3fd576277375e70f8391d150b0a67 (diff) | |
download | DotNetOpenAuth-bbe3f9cc9c8a1e5909273c1a162a63ea7a66afd8.zip DotNetOpenAuth-bbe3f9cc9c8a1e5909273c1a162a63ea7a66afd8.tar.gz DotNetOpenAuth-bbe3f9cc9c8a1e5909273c1a162a63ea7a66afd8.tar.bz2 |
Switched out the Sandcastle binaries for the source code.
Diffstat (limited to 'tools/Sandcastle/Source/BuildAssembler/BuildComponents/CloneComponent.cs')
-rw-r--r-- | tools/Sandcastle/Source/BuildAssembler/BuildComponents/CloneComponent.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tools/Sandcastle/Source/BuildAssembler/BuildComponents/CloneComponent.cs b/tools/Sandcastle/Source/BuildAssembler/BuildComponents/CloneComponent.cs new file mode 100644 index 0000000..c97d68d --- /dev/null +++ b/tools/Sandcastle/Source/BuildAssembler/BuildComponents/CloneComponent.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Xml; +using System.Xml.XPath; +using System.Xml.Xsl; + +using System.Reflection; + +namespace Microsoft.Ddue.Tools { + + public class CloneComponent : BuildComponent { + + private List<IEnumerable<BuildComponent>> branches = new List<IEnumerable<BuildComponent>>(); + + public CloneComponent (BuildAssembler assembler, XPathNavigator configuration) : base(assembler, configuration) { + + XPathNodeIterator branch_nodes = configuration.Select("branch"); + foreach (XPathNavigator branch_node in branch_nodes) { + BuildComponent[] branch = BuildAssembler.LoadComponents(branch_node); + branches.Add(branch); + } + + } + + public override void Apply (XmlDocument document, string key) { + + foreach (IEnumerable<BuildComponent> branch in branches) { + XmlDocument subdocument = document.Clone() as XmlDocument; + foreach(BuildComponent component in branch) { + component.Apply(subdocument, key); + } + } + + } + + } + +}
\ No newline at end of file |