-Fixed MetadataTypeAttribute reflection bug by using CustomAttributeData
-Fixed immutable collections bug by getting type from known assembly -Added support from running tests on aspnetcore50
This commit is contained in:
@@ -33,7 +33,7 @@ using System.Linq;
|
||||
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
|
||||
[Serializable]
|
||||
public class AnswerFilterModel
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Newtonsoft.Json.Tests.TestObjects
|
||||
public ulong ULong = long.MaxValue;
|
||||
public double Double = double.MaxValue;
|
||||
public float Float = float.MaxValue;
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
|
||||
public DBNull DBNull = DBNull.Value;
|
||||
#endif
|
||||
public bool Bool = true;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(NET35 || NET20 || NETFX_CORE)
|
||||
#if !(NET35 || NET20 || NETFX_CORE || ASPNETCORE50)
|
||||
using Microsoft.FSharp.Core;
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE40 || PORTABLE || ASPNETCORE50)
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
@@ -27,7 +27,7 @@ using System.ComponentModel;
|
||||
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
#if !NETFX_CORE
|
||||
#if !(NETFX_CORE || ASPNETCORE50)
|
||||
[Description("DefaultValueAttributeTestClass description!")]
|
||||
#endif
|
||||
public sealed class DefaultValueAttributeTestClass
|
||||
|
||||
@@ -36,7 +36,7 @@ using System.Linq;
|
||||
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
#if !(NETFX_CORE || NET35 || NET20 || PORTABLE || PORTABLE40)
|
||||
#if !(NETFX_CORE || NET35 || NET20 || PORTABLE || ASPNETCORE50 || PORTABLE40)
|
||||
[TypeConverter(typeof(MyInterfaceConverter))]
|
||||
internal interface IMyInterface
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
protected internal override string ResolvePropertyName(string propertyName)
|
||||
{
|
||||
#if !(NETFX_CORE)
|
||||
#if !(NETFX_CORE || ASPNETCORE50)
|
||||
return ":::" + propertyName.ToUpper(CultureInfo.InvariantCulture) + ":::";
|
||||
#else
|
||||
return ":::" + propertyName.ToUpper() + ":::";
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
#if !(NETFX_CORE)
|
||||
#if !(NETFX_CORE || ASPNETCORE50)
|
||||
writer.WriteValue(":::" + value.ToString().ToUpper(CultureInfo.InvariantCulture) + ":::");
|
||||
#else
|
||||
writer.WriteValue(":::" + value.ToString().ToUpper() + ":::");
|
||||
@@ -45,7 +45,7 @@ namespace Newtonsoft.Json.Tests.TestObjects
|
||||
if (s == null)
|
||||
return null;
|
||||
|
||||
#if !(NETFX_CORE)
|
||||
#if !(NETFX_CORE || ASPNETCORE50)
|
||||
return s.ToLower(CultureInfo.InvariantCulture).Trim(new[] { ':' });
|
||||
#else
|
||||
return s.ToLower().Trim(new[] { ':' });
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.ComponentModel;
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
[JsonObject(Id = "Person", Title = "Title!", Description = "JsonObjectAttribute description!", MemberSerialization = MemberSerialization.OptIn)]
|
||||
#if !NETFX_CORE
|
||||
#if !(NETFX_CORE || ASPNETCORE50)
|
||||
[Description("DescriptionAttribute description!")]
|
||||
#endif
|
||||
public class Person
|
||||
|
||||
@@ -27,7 +27,7 @@ using System;
|
||||
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
|
||||
[Serializable]
|
||||
public class PersonSerializable
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ using System.Runtime.Serialization;
|
||||
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
#if !NETFX_CORE
|
||||
#if !(NETFX_CORE || ASPNETCORE50)
|
||||
public struct Ratio : IConvertible, IFormattable, ISerializable
|
||||
{
|
||||
private readonly int _numerator;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(NET35 || NET20 || NETFX_CORE)
|
||||
#if !(NET35 || NET20 || NETFX_CORE || ASPNETCORE50)
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -27,7 +27,7 @@ using System.Collections;
|
||||
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
#if !NETFX_CORE
|
||||
#if !(NETFX_CORE || ASPNETCORE50)
|
||||
public class TypedSubHashtable
|
||||
{
|
||||
public string Name;
|
||||
|
||||
Reference in New Issue
Block a user