Skip to content

Commit

Permalink
XDT changes
Browse files Browse the repository at this point in the history
Ensuring xdt classes are public
  • Loading branch information
ferventcoder committed Jan 20, 2016
1 parent e22839d commit e364bb8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions src/Core/Extensions/XElementExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,17 @@ public static XElement MergeWith(this XElement source, XElement target, IDiction
}
else
{
// If that element is null then add that node
source.Add(targetChild);
if (sourceChild == null)
{
// If that element is null then add that node
source.Add(targetChild);

var newlyAddedElement = source.Elements().Last();
Debug.Assert(newlyAddedElement.Name == targetChild.Name);
var newlyAddedElement = source.Elements().Last();
Debug.Assert(newlyAddedElement.Name == targetChild.Name);

// when we see an element, add all the previous comments before the child element
AddContents(pendingComments, newlyAddedElement.AddBeforeSelf);
// when we see an element, add all the previous comments before the child element
AddContents(pendingComments, newlyAddedElement.AddBeforeSelf);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/FileModifiers/XdtTransformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace NuGet
{
internal class XdtTransformer : IPackageFileTransformer
public class XdtTransformer : IPackageFileTransformer
{
public XdtTransformer()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/FileModifiers/XmlTransfomer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace NuGet
{
internal class XmlTransformer : IPackageFileTransformer
public class XmlTransformer : IPackageFileTransformer
{
private readonly IDictionary<XName, Action<XElement, XElement>> _nodeActions;

Expand Down

0 comments on commit e364bb8

Please sign in to comment.