Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/System.Xml.XDocument/System.Xml.XDocument.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,35 @@
<Reference Include="System.Xml.ReaderWriter" />
</ItemGroup>
<ItemGroup>
<Compile Include="System\Xml\Linq\BaseUriAnnotation.cs" />
<Compile Include="System\Xml\Linq\Extensions.cs" />
<Compile Include="System\Xml\Linq\LineInfoAnnotation.cs" />
<Compile Include="System\Xml\Linq\LineInfoEndElementAnnotation.cs" />
<Compile Include="System\Xml\Linq\XAttribute.cs" />
<Compile Include="System\Xml\Linq\XCData.cs" />
<Compile Include="System\Xml\Linq\XComment.cs" />
<Compile Include="System\Xml\Linq\XContainer.cs" />
<Compile Include="System\Xml\Linq\XDeclaration.cs" />
<Compile Include="System\Xml\Linq\XDocument.cs" />
<Compile Include="System\Xml\Linq\XDocumentType.cs" />
<Compile Include="System\Xml\Linq\XElement.cs" />
<Compile Include="System\Xml\Linq\XHashtable.cs" />
<Compile Include="System\Xml\Linq\XHelper.cs" />
<Compile Include="System\Xml\Linq\XLinq.cs" />
<Compile Include="System\Linq\Enumerable.cs" />
<Compile Include="System\Xml\Linq\XName.cs" />
<Compile Include="System\Xml\Linq\XNamespace.cs" />
<Compile Include="System\Xml\Linq\XNode.cs" />
<Compile Include="System\Xml\Linq\XNodeBuilder.cs" />
<Compile Include="System\Xml\Linq\XNodeDocumentOrderComparer.cs" />
<Compile Include="System\Xml\Linq\XNodeEqualityComparer.cs" />
<Compile Include="System\Xml\Linq\XNodeReader.cs" />
<Compile Include="System\Xml\Linq\XObject.cs" />
<Compile Include="System\Xml\Linq\XObjectChangeAnnotation.cs" />
<Compile Include="System\Xml\Linq\XObjectChangeEventArgs.cs" />
<Compile Include="System\Xml\Linq\XProcessingInstruction.cs" />
<Compile Include="System\Xml\Linq\XStreamingElement.cs" />
<Compile Include="System\Xml\Linq\XText.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
31 changes: 31 additions & 0 deletions src/System.Xml.XDocument/System/Xml/Linq/BaseUriAnnotation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.IO;
using System.Xml;
using CultureInfo = System.Globalization.CultureInfo;
using Debug = System.Diagnostics.Debug;
using IEnumerable = System.Collections.IEnumerable;
using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute;
using Enumerable = System.Linq.Enumerable;
using IComparer = System.Collections.IComparer;
using IEqualityComparer = System.Collections.IEqualityComparer;
using StringBuilder = System.Text.StringBuilder;
using Encoding = System.Text.Encoding;
using Interlocked = System.Threading.Interlocked;
using System.Reflection;

namespace System.Xml.Linq
{
class BaseUriAnnotation
{
internal string baseUri;

public BaseUriAnnotation(string baseUri)
{
this.baseUri = baseUri;
}
}
}
426 changes: 426 additions & 0 deletions src/System.Xml.XDocument/System/Xml/Linq/Extensions.cs

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions src/System.Xml.XDocument/System/Xml/Linq/LineInfoAnnotation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.IO;
using System.Xml;
using CultureInfo = System.Globalization.CultureInfo;
using Debug = System.Diagnostics.Debug;
using IEnumerable = System.Collections.IEnumerable;
using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute;
using Enumerable = System.Linq.Enumerable;
using IComparer = System.Collections.IComparer;
using IEqualityComparer = System.Collections.IEqualityComparer;
using StringBuilder = System.Text.StringBuilder;
using Encoding = System.Text.Encoding;
using Interlocked = System.Threading.Interlocked;
using System.Reflection;

namespace System.Xml.Linq
{
/// <summary>
/// Instance of this class is used as an annotation on any node
/// for which we want to store its line information.
/// Note: on XElement nodes this annotation stores the line info
/// for the element start tag. The matching end tag line info
/// if present is stored using the LineInfoEndElementAnnotation
/// instance annotation.
/// </summary>
class LineInfoAnnotation
{
internal int lineNumber;
internal int linePosition;

public LineInfoAnnotation(int lineNumber, int linePosition)
{
this.lineNumber = lineNumber;
this.linePosition = linePosition;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.IO;
using System.Xml;
using CultureInfo = System.Globalization.CultureInfo;
using Debug = System.Diagnostics.Debug;
using IEnumerable = System.Collections.IEnumerable;
using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute;
using Enumerable = System.Linq.Enumerable;
using IComparer = System.Collections.IComparer;
using IEqualityComparer = System.Collections.IEqualityComparer;
using StringBuilder = System.Text.StringBuilder;
using Encoding = System.Text.Encoding;
using Interlocked = System.Threading.Interlocked;
using System.Reflection;

namespace System.Xml.Linq
{
/// <summary>
/// Instance of this class is used as an annotation on XElement nodes
/// if that element is not empty element and we want to store the line info
/// for its end element tag.
/// </summary>
class LineInfoEndElementAnnotation : LineInfoAnnotation
{
public LineInfoEndElementAnnotation(int lineNumber, int linePosition)
: base(lineNumber, linePosition)
{ }
}
}
Loading