diff --git a/BunqSdk/BunqSdk.csproj b/BunqSdk/BunqSdk.csproj index 688b6f3..de4ba09 100755 --- a/BunqSdk/BunqSdk.csproj +++ b/BunqSdk/BunqSdk.csproj @@ -1,8 +1,6 @@  - 1.1.2 - netcoreapp1.1 - Library + netstandard1.5 default @@ -26,6 +24,7 @@ + diff --git a/BunqSdk/Json/AnchorObjectConverter.cs b/BunqSdk/Json/AnchorObjectConverter.cs index b8b1c9e..e701dfd 100644 --- a/BunqSdk/Json/AnchorObjectConverter.cs +++ b/BunqSdk/Json/AnchorObjectConverter.cs @@ -34,13 +34,13 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist if (!model.IsAllFieldNull()) return model; - var fields = objectType.GetProperties(); + var fields = objectType.GetTypeInfo().GetProperties(); foreach (var field in fields) { var fieldType = field.PropertyType; - if (!typeof(BunqModel).IsAssignableFrom(fieldType)) + if (!typeof(BunqModel).GetTypeInfo().IsAssignableFrom(fieldType)) { continue; } @@ -55,7 +55,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist public override bool CanConvert(Type objectType) { - return typeof(IAnchorObjectInterface).IsAssignableFrom(objectType); + return typeof(IAnchorObjectInterface).GetTypeInfo().IsAssignableFrom(objectType); } } } diff --git a/BunqSdk/Json/BunqContractResolver.cs b/BunqSdk/Json/BunqContractResolver.cs index 43ff726..5b2ca48 100644 --- a/BunqSdk/Json/BunqContractResolver.cs +++ b/BunqSdk/Json/BunqContractResolver.cs @@ -64,7 +64,7 @@ protected override JsonContract CreateContract(Type objectType) private JsonConverter GetCustomConverterOrNull(Type objectType) { - if (typeof(IAnchorObjectInterface).IsAssignableFrom(objectType)) + if (typeof(IAnchorObjectInterface).GetTypeInfo().IsAssignableFrom(objectType)) { return converterRegistry.ContainsKey(typeof(IAnchorObjectInterface)) ? converterRegistry[typeof(IAnchorObjectInterface)]