-Build
This commit is contained in:
@@ -3249,6 +3249,7 @@ null//comment
|
||||
"Unexpected character encountered while parsing value: !. Path 'frameworks.dnxcore50.dependencies.['System.Xml.ReaderWriter'].source', line 6, position 21.");
|
||||
}
|
||||
|
||||
#if !DNXCORE50
|
||||
[Test]
|
||||
[Ignore("Fix this next major version")]
|
||||
public void LinePositionOnNewLine()
|
||||
@@ -3297,6 +3298,7 @@ null//comment
|
||||
|
||||
Assert.IsFalse(r.Read());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public class ToggleReaderError : TextReader
|
||||
|
||||
@@ -335,6 +335,7 @@
|
||||
<Compile Include="TestObjects\WidgetId1.cs" />
|
||||
<Compile Include="TestObjects\WidgetIdJsonConverter.cs" />
|
||||
<Compile Include="TestObjects\WithEnums.cs" />
|
||||
<Compile Include="Utilities\ConvertUtilsTests.cs" />
|
||||
<Compile Include="Utilities\ExpressionReflectionDelegateFactoryTests.cs" />
|
||||
<Compile Include="Utilities\DateTimeUtilsTests.cs" />
|
||||
<Compile Include="Utilities\DynamicReflectionDelegateFactoryTests.cs" />
|
||||
|
||||
@@ -181,6 +181,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}", strJsonMainClass);
|
||||
}
|
||||
|
||||
#if !(PORTABLE || PORTABLE40 || NET20 || NET35)
|
||||
[Test]
|
||||
public void LargeIntegerAsString()
|
||||
{
|
||||
@@ -199,6 +200,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
{
|
||||
public string Blah { get; set; }
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void CaseInsensitiveRequiredPropertyConstructorCreation()
|
||||
|
||||
@@ -86,14 +86,14 @@ namespace Newtonsoft.Json.Serialization
|
||||
if (property.DeclaringType != null && existingProperty.DeclaringType != null)
|
||||
{
|
||||
if (property.DeclaringType.IsSubclassOf(existingProperty.DeclaringType)
|
||||
|| (existingProperty.DeclaringType.IsInterface && property.DeclaringType.ImplementInterface(existingProperty.DeclaringType)))
|
||||
|| (existingProperty.DeclaringType.IsInterface() && property.DeclaringType.ImplementInterface(existingProperty.DeclaringType)))
|
||||
{
|
||||
// current property is on a derived class and hides the existing
|
||||
Remove(existingProperty);
|
||||
duplicateProperty = false;
|
||||
}
|
||||
if (existingProperty.DeclaringType.IsSubclassOf(property.DeclaringType)
|
||||
|| (property.DeclaringType.IsInterface && existingProperty.DeclaringType.ImplementInterface(property.DeclaringType)))
|
||||
|| (property.DeclaringType.IsInterface() && existingProperty.DeclaringType.ImplementInterface(property.DeclaringType)))
|
||||
{
|
||||
// current property is hidden by the existing so don't add it
|
||||
return;
|
||||
|
||||
@@ -553,13 +553,12 @@ namespace Newtonsoft.Json.Utilities
|
||||
|
||||
public static bool ImplementInterface(this Type type, Type interfaceType)
|
||||
{
|
||||
for (Type currentType = type; currentType != null; currentType = currentType.BaseType)
|
||||
for (Type currentType = type; currentType != null; currentType = currentType.BaseType())
|
||||
{
|
||||
Type[] interfaces = currentType.GetInterfaces();
|
||||
|
||||
for (int i = 0; i < interfaces.Length; i++)
|
||||
IEnumerable<Type> interfaces = currentType.GetInterfaces();
|
||||
foreach (Type i in interfaces)
|
||||
{
|
||||
if (interfaces[i] == interfaceType || (interfaces[i] != null && interfaces[i].ImplementInterface(interfaceType)))
|
||||
if (i == interfaceType || (i != null && i.ImplementInterface(interfaceType)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user