This repository has been archived by the owner on Jan 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added benchmarks to solution file and some other changes.
- Loading branch information
Showing
10 changed files
with
209 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/XmlAbstraction/benchmarks/XmlAbstraction.Benchmark.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) 2018-2019, AraHaan | ||
// https://github.com/AraHaan/ | ||
// All rights reserved. | ||
// license: MIT, see LICENSE for more details. | ||
|
||
namespace XmlAbstraction | ||
{ | ||
using System.IO; | ||
using System.Xml.Linq; | ||
|
||
/// <summary> | ||
/// A hack class to bridge the gaps in <see cref="XDocument"/> for .NET Standard pre 2.0. | ||
/// </summary> | ||
internal static class XDocumentExtensions | ||
{ | ||
/// <summary> | ||
/// Serialize this <see cref="XDocument"/> to a file, overwriting an existing file, | ||
/// if it exists. | ||
/// </summary> | ||
/// <param name="xdoc">The <see cref="XDocument"/> for which to save.</param> | ||
/// <param name="fileName"> | ||
/// A string that contains the name of the file. | ||
/// </param> | ||
internal static void Save(this XDocument xdoc, string fileName) | ||
{ | ||
using (var fstream = File.Create(fileName)) | ||
{ | ||
xdoc.Save(fstream); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (c) 2018-2019, AraHaan | ||
// https://github.com/AraHaan/ | ||
// All rights reserved. | ||
// license: MIT, see LICENSE for more details. | ||
|
||
namespace XmlAbstraction | ||
{ | ||
internal class XmlAttributeData | ||
{ | ||
internal string AttributeName { get; set; } = string.Empty; | ||
|
||
internal string Value { get; set; } = string.Empty; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) 2018-2019, AraHaan | ||
// https://github.com/AraHaan/ | ||
// All rights reserved. | ||
// license: MIT, see LICENSE for more details. | ||
|
||
namespace XmlAbstraction | ||
{ | ||
using System.Collections.Generic; | ||
|
||
internal class XmlElementData | ||
{ | ||
internal string Name { get; set; } = string.Empty; | ||
|
||
internal List<XmlElementData> Subelements { get; set; } = null; | ||
|
||
internal List<XmlAttributeData> Attributes { get; set; } = new List<XmlAttributeData>(); | ||
|
||
internal string Value { get; set; } = string.Empty; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
// ACTION REQUIRED: This file was automatically added to your project, but it | ||
// will not take effect until additional steps are taken to enable it. See the | ||
// following page for additional information: | ||
// | ||
// https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/EnableConfiguration.md | ||
|
||
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", | ||
"settings": { | ||
"documentationRules": { | ||
"companyName": "AraHaan", | ||
"copyrightText": "Copyright (c) 2018-2019, {companyName}\nhttps://github.com/AraHaan/\nAll rights reserved.\nlicense: MIT, see LICENSE for more details.", | ||
"documentInternalElements": false, | ||
"xmlHeader": false | ||
} | ||
} | ||
} |