-Added additional frameworks to project.json files

This commit is contained in:
James Newton-King
2015-08-22 19:08:40 +12:00
parent 6b02abe20c
commit a9ea63da59
142 changed files with 1090 additions and 222 deletions
@@ -27,15 +27,10 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using Newtonsoft.Json.Linq;
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif DNXCORE50
#if DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -43,9 +38,11 @@ using Assert = Newtonsoft.Json.Tests.XUnitAssert;
using NUnit.Framework;
#endif
#if !(DNXCORE50 || NET20)
namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
{
#region Types
#region Types
public class XmlJsonReader : JsonReader
{
private readonly Stack<JTokenType> _stateStack;
@@ -244,7 +241,7 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
return (Value != null) ? (DateTimeOffset?)Convert.ToDateTime(Value) : null;
}
}
#endregion
#endregion
[TestFixture]
public class CustomJsonReader : TestFixtureBase
@@ -252,7 +249,7 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
[Test]
public void Example()
{
#region Usage
#region Usage
string xml = @"<Root type=""Object"">
<Null type=""Null"" />
<String type=""String"">This is a string!</String>
@@ -311,7 +308,7 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
// "Constructor": new Date(2000, 12, 30)
//}
}
#endregion
#endregion
using (XmlReader xmlReader = XmlReader.Create(new StringReader(xml), new XmlReaderSettings { IgnoreWhitespace = true }))
using (XmlJsonReader reader = new XmlJsonReader(xmlReader))
@@ -483,4 +480,6 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
}
}
}
}
}
#endif
@@ -27,15 +27,22 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using Newtonsoft.Json.Linq;
#if DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
#else
using NUnit.Framework;
#endif
#if !(DNXCORE50 || NET20)
namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
{
#region Types
#region Types
public class XmlJsonWriter : JsonWriter
{
private readonly XmlWriter _writer;
@@ -299,7 +306,7 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
}
}
}
#endregion
#endregion
[TestFixture]
public class CustomJsonWriter : TestFixtureBase
@@ -307,7 +314,7 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
[Test]
public void Example()
{
#region Usage
#region Usage
var user = new
{
Name = "James",
@@ -341,7 +348,7 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
// <Item type="String">Administrator</Item>
// </Roles>
//</Root>
#endregion
#endregion
sw = new StringWriter();
@@ -443,4 +450,6 @@ namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
//</Root>
}
}
}
}
#endif
@@ -26,9 +26,14 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
#if DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
#else
using NUnit.Framework;
#endif
namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
{
@@ -26,14 +26,8 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif DNXCORE50
#if DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -26,9 +26,14 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
#if DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
#else
using NUnit.Framework;
#endif
namespace Newtonsoft.Json.Tests.Documentation.Samples.Json
{