This commit is contained in:
Alexandre Mutel 2013-10-25 07:45:40 +09:00
Родитель 072394f8ca
Коммит dfcba807f0
276 изменённых файлов: 795 добавлений и 5354 удалений

Просмотреть файл

@ -32,7 +32,7 @@ using System;
[assembly: AssemblyConfiguration("Release")]
#endif
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("YamlDotNet")]
[assembly: AssemblyProduct("SharpYaml")]
[assembly: AssemblyCopyright("Copyright © Antoine Aubry 2008, 2009, 2010, 2011, 2012, 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Просмотреть файл

@ -64,9 +64,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\YamlDotNet\YamlDotNet.csproj">
<ProjectReference Include="..\SharpYaml\SharpYaml.csproj">
<Project>{BF32DE1B-6276-4341-B212-F8862ADBBA7A}</Project>
<Name>YamlDotNet</Name>
<Name>SharpYaml</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -20,9 +20,9 @@
// SOFTWARE.
using System;
using YamlDotNet;
using SharpYaml;
using System.IO;
using YamlDotNet.Events;
using SharpYaml.Events;
namespace Dumper
{

Просмотреть файл

@ -1,8 +1,8 @@
using System;
using System.IO;
using YamlDotNet.Serialization;
using SharpYaml.Serialization;
namespace YamlDotNet.Samples
namespace SharpYaml.Samples
{
public class DeserializeObjectGraph
{

Просмотреть файл

@ -2,9 +2,9 @@ using System;
using System.Text;
using System.IO;
using System.Collections.Generic;
using YamlDotNet.Serialization;
using SharpYaml.Serialization;
namespace YamlDotNet.Samples
namespace SharpYaml.Samples
{
class LoadYamlStream
{

Просмотреть файл

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Reflection;
namespace YamlDotNet.Samples
namespace SharpYaml.Samples
{
class Program
{

Просмотреть файл

@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("YamlDotNet.Samples")]
[assembly: AssemblyTitle("SharpYaml.Samples")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("YamlDotNet.Samples")]
[assembly: AssemblyProduct("SharpYaml.Samples")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Просмотреть файл

@ -1,7 +1,7 @@
using System;
using YamlDotNet.Serialization;
using SharpYaml.Serialization;
namespace YamlDotNet.Samples
namespace SharpYaml.Samples
{
class SerializeObjectGraph
{

Просмотреть файл

@ -8,8 +8,8 @@
<ProjectGuid>{1EC10966-19C0-4CE3-949E-D11F600B8CA3}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>YamlDotNet.Samples</RootNamespace>
<AssemblyName>YamlDotNet.Samples</AssemblyName>
<RootNamespace>SharpYaml.Samples</RootNamespace>
<AssemblyName>SharpYaml.Samples</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
@ -54,13 +54,9 @@
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\YamlDotNet\YamlDotNet.csproj">
<ProjectReference Include="..\SharpYaml\SharpYaml.csproj">
<Project>{BF32DE1B-6276-4341-B212-F8862ADBBA7A}</Project>
<Name>YamlDotNet</Name>
</ProjectReference>
<ProjectReference Include="..\YamlDotNet.RepresentationModel\YamlDotNet.Serialzation.csproj">
<Project>{21CA0077-E15C-446D-9C43-F6D3F9D09687}</Project>
<Name>YamlDotNet.Serialzation</Name>
<Name>SharpYaml</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Просмотреть файл

Просмотреть файл

@ -5,10 +5,10 @@ using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using Xunit;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.Descriptors;
using SharpYaml.Serialization;
using SharpYaml.Serialization.Descriptors;
namespace YamlDotNet.Test
namespace SharpYaml.Test
{
public class DescriptorTests
{

Просмотреть файл

@ -1,6 +1,6 @@
using System.Diagnostics;
namespace YamlDotNet.Test
namespace SharpYaml.Test
{
public class Dump
{

Просмотреть файл

@ -23,10 +23,10 @@ using System.Linq;
using System.IO;
using Xunit;
using Xunit.Extensions;
using YamlDotNet.Events;
using YamlDotNet.Serialization;
using SharpYaml.Events;
using SharpYaml.Serialization;
namespace YamlDotNet.Test
namespace SharpYaml.Test
{
public class EmitterTests : YamlTest
{

Просмотреть файл

@ -25,7 +25,7 @@ using System.Linq;
using FluentAssertions;
using Xunit;
namespace YamlDotNet.Test
namespace SharpYaml.Test
{
public class InsertionQueueTests
{

Просмотреть файл

@ -26,7 +26,7 @@ using FakeItEasy.Core;
using FluentAssertions;
using Xunit;
namespace YamlDotNet.Test
namespace SharpYaml.Test
{
public class LookAheadBufferTests
{

Просмотреть файл

@ -19,12 +19,12 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
using YamlDotNet.Events;
using YamlDotNet.Test;
using TagDirective = YamlDotNet.Tokens.TagDirective;
using VersionDirective = YamlDotNet.Tokens.VersionDirective;
using SharpYaml.Events;
using SharpYaml.Test;
using TagDirective = SharpYaml.Tokens.TagDirective;
using VersionDirective = SharpYaml.Tokens.VersionDirective;
namespace YamlDotNet.Test
namespace SharpYaml.Test
{
public class ParserTestHelper : YamlTest
{

Просмотреть файл

@ -22,10 +22,10 @@
using System.Collections;
using FluentAssertions;
using Xunit;
using YamlDotNet.Test;
using YamlDotNet.Events;
using SharpYaml.Test;
using SharpYaml.Events;
namespace YamlDotNet.Test
namespace SharpYaml.Test
{
public class ParserTests : ParserTestHelper
{

Просмотреть файл

@ -0,0 +1,384 @@
// This file is part of YamlDotNet - A .NET library for YAML.
// Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Antoine Aubry
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do
// so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
using System.Collections;
using Xunit;
<<<<<<< HEAD
using YamlDotNet.Events;
using VersionDirective = YamlDotNet.Tokens.VersionDirective;
using TagDirective = YamlDotNet.Tokens.TagDirective;
=======
using YamlDotNet.Core.Events;
>>>>>>> 44256f9... Simplified parser and scanner tests and improved failure messages
namespace YamlDotNet.Test
{
public class ParserTests : ParserTestHelper
{
[Fact]
public void EmptyDocument()
{
AssertSequenceOfEventsFrom(ParserFor("empty.yaml"),
StreamStart,
StreamEnd);
}
[Fact]
public void VerifyEventsOnExample1()
{
AssertSequenceOfEventsFrom(ParserFor("test1.yaml"),
StreamStart,
DocumentStart(Explicit, Version(1, 1),
TagDirective("!", "!foo"),
TagDirective("!yaml!", TagYaml),
TagDirective("!!", TagYaml)),
PlainScalar(string.Empty),
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample2()
{
AssertSequenceOfEventsFrom(ParserFor("test2.yaml"),
StreamStart,
DocumentStart(Implicit),
SingleQuotedScalar("a scalar"),
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample3()
{
AssertSequenceOfEventsFrom(ParserFor("test3.yaml"),
StreamStart,
DocumentStart(Explicit),
SingleQuotedScalar("a scalar"),
DocumentEnd(Explicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample4()
{
AssertSequenceOfEventsFrom(ParserFor("test4.yaml"),
StreamStart,
DocumentStart(Implicit),
SingleQuotedScalar("a scalar"),
DocumentEnd(Implicit),
DocumentStart(Explicit),
SingleQuotedScalar("another scalar"),
DocumentEnd(Implicit),
DocumentStart(Explicit),
SingleQuotedScalar("yet another scalar"),
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample5()
{
AssertSequenceOfEventsFrom(ParserFor("test5.yaml"),
StreamStart,
DocumentStart(Implicit),
AnchoredFlowSequenceStart("A"),
AnchorAlias("A"),
SequenceEnd,
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample6()
{
var parser = ParserFor("test6.yaml");
AssertSequenceOfEventsFrom(parser,
StreamStart,
DocumentStart(Implicit),
ExplicitDoubleQuotedScalar(TagYaml + "float", "3.14"),
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample7()
{
AssertSequenceOfEventsFrom(ParserFor("test7.yaml"),
StreamStart,
DocumentStart(Explicit),
PlainScalar(string.Empty),
DocumentEnd(Implicit),
DocumentStart(Explicit),
PlainScalar("a plain scalar"),
DocumentEnd(Implicit),
DocumentStart(Explicit),
SingleQuotedScalar("a single-quoted scalar"),
DocumentEnd(Implicit),
DocumentStart(Explicit),
DoubleQuotedScalar("a double-quoted scalar"),
DocumentEnd(Implicit),
DocumentStart(Explicit),
LiteralScalar("a literal scalar"),
DocumentEnd(Implicit),
DocumentStart(Explicit),
FoldedScalar("a folded scalar"),
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample8()
{
AssertSequenceOfEventsFrom(ParserFor("test8.yaml"),
StreamStart,
DocumentStart(Implicit),
FlowSequenceStart,
PlainScalar("item 1"),
PlainScalar("item 2"),
PlainScalar("item 3"),
SequenceEnd,
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample9()
{
AssertSequenceOfEventsFrom(ParserFor("test9.yaml"),
StreamStart,
DocumentStart(Implicit),
FlowMappingStart,
PlainScalar("a simple key"),
PlainScalar("a value"),
PlainScalar("a complex key"),
PlainScalar("another value"),
MappingEnd,
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample10()
{
AssertSequenceOfEventsFrom(ParserFor("test10.yaml"),
StreamStart,
DocumentStart(Implicit),
BlockSequenceStart,
PlainScalar("item 1"),
PlainScalar("item 2"),
BlockSequenceStart,
PlainScalar("item 3.1"),
PlainScalar("item 3.2"),
SequenceEnd,
BlockMappingStart,
PlainScalar("key 1"),
PlainScalar("value 1"),
PlainScalar("key 2"),
PlainScalar("value 2"),
MappingEnd,
SequenceEnd,
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample11()
{
AssertSequenceOfEventsFrom(ParserFor("test11.yaml"),
StreamStart,
DocumentStart(Implicit),
BlockMappingStart,
PlainScalar("a simple key"),
PlainScalar("a value"),
PlainScalar("a complex key"),
PlainScalar("another value"),
PlainScalar("a mapping"),
BlockMappingStart,
PlainScalar("key 1"),
PlainScalar("value 1"),
PlainScalar("key 2"),
PlainScalar("value 2"),
MappingEnd,
PlainScalar("a sequence"),
BlockSequenceStart,
PlainScalar("item 1"),
PlainScalar("item 2"),
SequenceEnd,
MappingEnd,
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample12()
{
AssertSequenceOfEventsFrom(ParserFor("test12.yaml"),
StreamStart,
DocumentStart(Implicit),
BlockSequenceStart,
BlockSequenceStart,
PlainScalar("item 1"),
PlainScalar("item 2"),
SequenceEnd,
BlockMappingStart,
PlainScalar("key 1"),
PlainScalar("value 1"),
PlainScalar("key 2"),
PlainScalar("value 2"),
MappingEnd,
BlockMappingStart,
PlainScalar("complex key"),
PlainScalar("complex value"),
MappingEnd,
SequenceEnd,
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample13()
{
AssertSequenceOfEventsFrom(ParserFor("test13.yaml"),
StreamStart,
DocumentStart(Implicit),
BlockMappingStart,
PlainScalar("a sequence"),
BlockSequenceStart,
PlainScalar("item 1"),
PlainScalar("item 2"),
SequenceEnd,
PlainScalar("a mapping"),
BlockMappingStart,
PlainScalar("key 1"),
PlainScalar("value 1"),
PlainScalar("key 2"),
PlainScalar("value 2"),
MappingEnd,
MappingEnd,
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokensOnExample14()
{
AssertSequenceOfEventsFrom(ParserFor("test14.yaml"),
StreamStart,
DocumentStart(Implicit),
BlockMappingStart,
PlainScalar("key"),
BlockSequenceStart,
PlainScalar("item 1"),
PlainScalar("item 2"),
SequenceEnd,
MappingEnd,
DocumentEnd(Implicit),
StreamEnd);
}
[Fact]
public void VerifyTokenWithLocalTags()
{
AssertSequenceOfEventsFrom(ParserFor("local-tags.yaml"),
StreamStart,
DocumentStart(Explicit),
TaggedBlockMappingStart("!MyObject"),
PlainScalar("a"),
PlainScalar("1.0"),
PlainScalar("b"),
PlainScalar("42"),
PlainScalar("c"),
PlainScalar("-7"),
MappingEnd,
DocumentEnd(Implicit),
StreamEnd);
}
private IParser ParserFor(string name)
{
return new Parser(YamlFile(name));
}
private void AssertSequenceOfEventsFrom(IParser parser, params ParsingEvent[] events)
{
var eventNumber = 1;
foreach (var @event in events)
{
Assert.True(parser.MoveNext(), "Missing parse event number " + eventNumber);
AssertCurrent(parser, @event, eventNumber);
eventNumber++;
}
Assert.False(parser.MoveNext(), "Found extra parse events");
}
private void AssertCurrent(IParser parser, ParsingEvent expected, int eventNumber)
{
var parsingEvent = parser.Current;
Assert.True(expected.GetType().IsInstanceOfType(parsingEvent),
string.Format("Parse event {0} is not of the expected type. Exprected: {1}, Actual: {2}",
eventNumber, expected.GetType().Name, parsingEvent.GetType().Name));
foreach (var property in expected.GetType().GetProperties())
{
if (property.PropertyType == typeof(Mark) || !property.CanRead)
{
continue;
}
var value = property.GetValue(parsingEvent, null);
var expectedValue = property.GetValue(expected, null);
if (expectedValue is IEnumerable && !(expectedValue is string))
{
Dump.Write("\t{0} = {{", property.Name);
Dump.Write(string.Join(", ", (IEnumerable)value));
Dump.WriteLine("}");
if (expectedValue is ICollection && value is ICollection)
{
var expectedCount = ((ICollection)expectedValue).Count;
var valueCount = ((ICollection)value).Count;
Assert.True(expectedCount.Equals(valueCount),
string.Format("Expected property {0} in parse event {1} to be a collection with {2} elements but found {3} elements",
property.Name, eventNumber, expectedCount, valueCount));
}
var values = ((IEnumerable)value).GetEnumerator();
var expectedValues = ((IEnumerable)expectedValue).GetEnumerator();
while (expectedValues.MoveNext())
{
Assert.True(values.MoveNext(), string.Format("Property {0} in parse event {1} had too few elements", property.Name, eventNumber));
Assert.True(Equals(expectedValues.Current, values.Current),
string.Format("Expected element in property {0} in parse event {1} to be {2} but was {3}",
property.Name, eventNumber, expectedValues.Current, values.Current));
}
Assert.False(values.MoveNext(), string.Format("Property {0} in parse event {1} had too many elements", property.Name, eventNumber));
}
else
{
Dump.WriteLine("\t{0} = {1}", property.Name, value);
Assert.True(Equals(expectedValue, value), string.Format("Expected property {0} in parse event {1} to be {2} but was {3}",
property.Name, eventNumber, expectedValue, value));
}
}
}
}
}

Просмотреть файл

@ -26,11 +26,11 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("YamlDotNet.Test")]
[assembly: AssemblyTitle("SharpYaml.Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("YamlDotNet.Test")]
[assembly: AssemblyProduct("SharpYaml.Test")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Просмотреть файл

@ -19,10 +19,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
using YamlDotNet.Test;
using YamlDotNet.Tokens;
using SharpYaml.Test;
using SharpYaml.Tokens;
namespace YamlDotNet.Test
namespace SharpYaml.Test
{
public class ScannerTestHelper : YamlTest
{

Просмотреть файл

@ -21,9 +21,9 @@
using FluentAssertions;
using Xunit;
using YamlDotNet.Tokens;
using SharpYaml.Tokens;
namespace YamlDotNet.Test
namespace SharpYaml.Test
{
public class ScannerTests : ScannerTestHelper
{

Просмотреть файл

@ -1,10 +1,10 @@
using System;
using Xunit;
using YamlDotNet.Events;
using YamlDotNet.Schemas;
using YamlDotNet.Serialization;
using SharpYaml.Events;
using SharpYaml.Schemas;
using SharpYaml.Serialization;
namespace YamlDotNet.Test
namespace SharpYaml.Test
{
public class SchemaTests
{

Просмотреть файл

@ -1,8 +1,8 @@
using System.IO;
using Xunit;
using YamlDotNet.Serialization;
using SharpYaml.Serialization;
namespace YamlDotNet.Test.Serialization
namespace SharpYaml.Test.Serialization
{
public class ExceptionWithNestedSerialization
{

Просмотреть файл

@ -1,8 +1,8 @@
using System.IO;
using Xunit;
using YamlDotNet.Serialization;
using SharpYaml.Serialization;
namespace YamlDotNet.Test.Serialization
namespace SharpYaml.Test.Serialization
{
public class ObjectFactoryTests
{

Просмотреть файл

@ -1,9 +1,9 @@
using System;
using System.IO;
using Xunit;
using YamlDotNet.Serialization;
using SharpYaml.Serialization;
namespace YamlDotNet.Test.Serialization
namespace SharpYaml.Test.Serialization
{
public class Program
{

Просмотреть файл

@ -30,11 +30,11 @@ using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using Xunit;
using YamlDotNet.Events;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.Serializers;
using SharpYaml.Events;
using SharpYaml.Serialization;
using SharpYaml.Serialization.Serializers;
namespace YamlDotNet.Test.Serialization
namespace SharpYaml.Test.Serialization
{
public class SerializationTests : YamlTest
{

Просмотреть файл

@ -4,9 +4,9 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using Xunit;
using YamlDotNet.Serialization;
using SharpYaml.Serialization;
namespace YamlDotNet.Test.Serialization
namespace SharpYaml.Test.Serialization
{
public class SerializationTests2
{

Просмотреть файл

@ -20,9 +20,9 @@
// SOFTWARE.
using System;
using YamlDotNet.Serialization;
using SharpYaml.Serialization;
namespace YamlDotNet.Test.Serialization
namespace SharpYaml.Test.Serialization
{
public class TracingVisitor : YamlVisitor
{

Просмотреть файл

@ -21,11 +21,11 @@
using System.Collections.Generic;
using Xunit;
using YamlDotNet.Serialization;
using SharpYaml.Serialization;
using System.Text;
using System.IO;
namespace YamlDotNet.Test.Serialization
namespace SharpYaml.Test.Serialization
{
public class YamlStreamTests : YamlTest
{

Просмотреть файл

@ -7,8 +7,8 @@
<ProjectGuid>{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>YamlDotNet.Test</RootNamespace>
<AssemblyName>YamlDotNet.Test</AssemblyName>
<RootNamespace>SharpYaml.Tests</RootNamespace>
<AssemblyName>SharpYaml.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
@ -110,9 +110,9 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\YamlDotNet\YamlDotNet.csproj">
<ProjectReference Include="..\SharpYaml\SharpYaml.csproj">
<Project>{bf32de1b-6276-4341-b212-f8862adbba7a}</Project>
<Name>YamlDotNet</Name>
<Name>SharpYaml</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Просмотреть файл

@ -25,7 +25,7 @@ using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
namespace YamlDotNet.Test
namespace SharpYaml.Test
{
public class YamlTest
{

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

83
SharpYaml.sln Normal file
Просмотреть файл

@ -0,0 +1,83 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{69EE9636-55BA-49C2-827E-D5684221C345}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
CommonAssemblyInfo.cs = CommonAssemblyInfo.cs
LICENSE = LICENSE
SharpYaml.build = SharpYaml.build
SharpYaml.nuspec = SharpYaml.nuspec
SharpYaml.snk = SharpYaml.snk
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpYaml", "SharpYaml\SharpYaml.csproj", "{BF32DE1B-6276-4341-B212-F8862ADBBA7A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dumper", "Dumper\Dumper.csproj", "{BB38DE1D-A8E2-4035-AC3A-C6B5AF6B6252}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpYaml.Samples", "SharpYaml.Samples\SharpYaml.Samples.csproj", "{1EC10966-19C0-4CE3-949E-D11F600B8CA3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{8DC198EF-4A39-4072-A66A-CA0DF8396F22}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpYaml.Tests", "SharpYaml.Tests\SharpYaml.Tests.csproj", "{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BF32DE1B-6276-4341-B212-F8862ADBBA7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BF32DE1B-6276-4341-B212-F8862ADBBA7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BF32DE1B-6276-4341-B212-F8862ADBBA7A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{BF32DE1B-6276-4341-B212-F8862ADBBA7A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{BF32DE1B-6276-4341-B212-F8862ADBBA7A}.Debug|x86.ActiveCfg = Debug|Any CPU
{BF32DE1B-6276-4341-B212-F8862ADBBA7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BF32DE1B-6276-4341-B212-F8862ADBBA7A}.Release|Any CPU.Build.0 = Release|Any CPU
{BF32DE1B-6276-4341-B212-F8862ADBBA7A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{BF32DE1B-6276-4341-B212-F8862ADBBA7A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{BF32DE1B-6276-4341-B212-F8862ADBBA7A}.Release|x86.ActiveCfg = Release|Any CPU
{BB38DE1D-A8E2-4035-AC3A-C6B5AF6B6252}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB38DE1D-A8E2-4035-AC3A-C6B5AF6B6252}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB38DE1D-A8E2-4035-AC3A-C6B5AF6B6252}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{BB38DE1D-A8E2-4035-AC3A-C6B5AF6B6252}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{BB38DE1D-A8E2-4035-AC3A-C6B5AF6B6252}.Debug|x86.ActiveCfg = Debug|Any CPU
{BB38DE1D-A8E2-4035-AC3A-C6B5AF6B6252}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB38DE1D-A8E2-4035-AC3A-C6B5AF6B6252}.Release|Any CPU.Build.0 = Release|Any CPU
{BB38DE1D-A8E2-4035-AC3A-C6B5AF6B6252}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{BB38DE1D-A8E2-4035-AC3A-C6B5AF6B6252}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{BB38DE1D-A8E2-4035-AC3A-C6B5AF6B6252}.Release|x86.ActiveCfg = Release|Any CPU
{1EC10966-19C0-4CE3-949E-D11F600B8CA3}.Debug|Any CPU.ActiveCfg = Debug|x86
{1EC10966-19C0-4CE3-949E-D11F600B8CA3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{1EC10966-19C0-4CE3-949E-D11F600B8CA3}.Debug|Mixed Platforms.Build.0 = Debug|x86
{1EC10966-19C0-4CE3-949E-D11F600B8CA3}.Debug|x86.ActiveCfg = Debug|x86
{1EC10966-19C0-4CE3-949E-D11F600B8CA3}.Debug|x86.Build.0 = Debug|x86
{1EC10966-19C0-4CE3-949E-D11F600B8CA3}.Release|Any CPU.ActiveCfg = Release|x86
{1EC10966-19C0-4CE3-949E-D11F600B8CA3}.Release|Mixed Platforms.ActiveCfg = Release|x86
{1EC10966-19C0-4CE3-949E-D11F600B8CA3}.Release|Mixed Platforms.Build.0 = Release|x86
{1EC10966-19C0-4CE3-949E-D11F600B8CA3}.Release|x86.ActiveCfg = Release|x86
{1EC10966-19C0-4CE3-949E-D11F600B8CA3}.Release|x86.Build.0 = Release|x86
{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}.Debug|x86.ActiveCfg = Debug|Any CPU
{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}.Release|Any CPU.Build.0 = Release|Any CPU
{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{16D8043D-C3DB-4868-BFF3-B2EBDF537AAA}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

Просмотреть файл

@ -22,7 +22,7 @@
using System;
using System.Diagnostics;
namespace YamlDotNet
namespace SharpYaml
{
internal class CharacterAnalyzer<TBuffer> where TBuffer : ILookAheadBuffer
{

Просмотреть файл

@ -20,9 +20,9 @@
// SOFTWARE.
using System;
using YamlDotNet.Tokens;
using SharpYaml.Tokens;
namespace YamlDotNet
namespace SharpYaml
{
/// <summary>
/// Defines constants thar relate to the YAML specification.

Просмотреть файл

@ -26,12 +26,12 @@ using System.Globalization;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using YamlDotNet.Events;
using Event = YamlDotNet.Events.IParsingEvent;
using TagDirective = YamlDotNet.Tokens.TagDirective;
using VersionDirective = YamlDotNet.Tokens.VersionDirective;
using SharpYaml.Events;
using Event = SharpYaml.Events.IParsingEvent;
using TagDirective = SharpYaml.Tokens.TagDirective;
using VersionDirective = SharpYaml.Tokens.VersionDirective;
namespace YamlDotNet
namespace SharpYaml
{
/// <summary>
/// Emits YAML streams.

Просмотреть файл

@ -21,7 +21,7 @@
using System;
namespace YamlDotNet
namespace SharpYaml
{
/// <summary>
/// Defines the YAML emitter's state.

Просмотреть файл

@ -21,12 +21,12 @@
using System;
using System.IO;
using YamlDotNet;
using SharpYaml;
using System.Globalization;
using Event = YamlDotNet.Events.ParsingEvent;
using YamlDotNet.Events;
using Event = SharpYaml.Events.ParsingEvent;
using SharpYaml.Events;
namespace YamlDotNet
namespace SharpYaml
{
/// <summary>
/// Reads events from a sequence of <see cref="Event" />.

Просмотреть файл

@ -22,7 +22,7 @@
using System;
using System.Globalization;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents an alias event.

Просмотреть файл

@ -22,7 +22,7 @@
using System;
using System.Globalization;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a document end event.

Просмотреть файл

@ -21,9 +21,9 @@
using System;
using System.Globalization;
using YamlDotNet.Tokens;
using SharpYaml.Tokens;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a document start event.

Просмотреть файл

@ -21,7 +21,7 @@
using System;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Defines the event types. This allows for simpler type comparisons.

Просмотреть файл

@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents an alias event.

Просмотреть файл

@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a document end event.

Просмотреть файл

@ -19,9 +19,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
using YamlDotNet.Tokens;
using SharpYaml.Tokens;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a document start event.

Просмотреть файл

@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a mapping end event.

Просмотреть файл

@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a mapping start event.

Просмотреть файл

@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Defines the behavior that is common between node events.

Просмотреть файл

@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Base interface for parsing events.

Просмотреть файл

@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a scalar event.

Просмотреть файл

@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a sequence end event.

Просмотреть файл

@ -21,7 +21,7 @@
using System;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a sequence start event.

Просмотреть файл

@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a stream end event.

Просмотреть файл

@ -19,7 +19,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a stream start event.

Просмотреть файл

@ -21,7 +21,7 @@
using System;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a mapping end event.

Просмотреть файл

@ -22,7 +22,7 @@
using System;
using System.Globalization;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a mapping start event.

Просмотреть файл

@ -22,7 +22,7 @@
using System;
using System.Text.RegularExpressions;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Contains the behavior that is common between node events.

Просмотреть файл

@ -21,7 +21,7 @@
using System;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Base class for parsing events.

Просмотреть файл

@ -22,7 +22,7 @@
using System;
using System.Globalization;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a scalar event.

Просмотреть файл

@ -21,7 +21,7 @@
using System;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a sequence end event.

Просмотреть файл

@ -22,7 +22,7 @@
using System;
using System.Globalization;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a sequence start event.

Просмотреть файл

@ -21,7 +21,7 @@
using System;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a stream end event.

Просмотреть файл

@ -21,7 +21,7 @@
using System;
namespace YamlDotNet.Events
namespace SharpYaml.Events
{
/// <summary>
/// Represents a stream start event.

Просмотреть файл

@ -22,7 +22,7 @@
using System;
using System.Collections.Generic;
namespace YamlDotNet
namespace SharpYaml
{
/// <summary>
/// Implements an indexer through an IEnumerator&lt;T&gt;.

Просмотреть файл

@ -1,6 +1,6 @@
using YamlDotNet.Events;
using SharpYaml.Events;
namespace YamlDotNet
namespace SharpYaml
{
/// <summary>
/// Represents a YAML stream emitter.

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше