From 8e72b37950bd4e648f154e9c5a2f59eed2803e57 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 24 Jan 2021 22:26:23 +0100 Subject: [PATCH] Switching to dotnet5 w/ C#9 --- Kyoo.Common/Kyoo.Common.csproj | 7 ++++--- Kyoo.Common/Utility.cs | 2 +- Kyoo.CommonAPI/Kyoo.CommonAPI.csproj | 6 ++++-- Kyoo.CommonAPI/LocalRepository.cs | 2 +- Kyoo/Kyoo.csproj | 4 ++-- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Kyoo.Common/Kyoo.Common.csproj b/Kyoo.Common/Kyoo.Common.csproj index cb9becf1..8d5a57d2 100644 --- a/Kyoo.Common/Kyoo.Common.csproj +++ b/Kyoo.Common/Kyoo.Common.csproj @@ -1,10 +1,10 @@  - netcoreapp3.1 + net5.0 true Kyoo.Common - Anonymus Raccoon + Zoe Roux Base package to create plugins for Kyoo. https://github.com/AnonymusRaccoon/Kyoo true @@ -15,11 +15,12 @@ 1.0.22 true snupkg + default - + diff --git a/Kyoo.Common/Utility.cs b/Kyoo.Common/Utility.cs index 70eb3baf..4828f322 100644 --- a/Kyoo.Common/Utility.cs +++ b/Kyoo.Common/Utility.cs @@ -177,7 +177,7 @@ namespace Kyoo return obj; } - public static bool IsOfType([NotNull] object obj, [NotNull] Type type) + public static bool IsOfGenericType([NotNull] object obj, [NotNull] Type type) { throw new NotImplementedException(); } diff --git a/Kyoo.CommonAPI/Kyoo.CommonAPI.csproj b/Kyoo.CommonAPI/Kyoo.CommonAPI.csproj index 7bd6a5d4..b16c5e99 100644 --- a/Kyoo.CommonAPI/Kyoo.CommonAPI.csproj +++ b/Kyoo.CommonAPI/Kyoo.CommonAPI.csproj @@ -1,12 +1,14 @@ - netcoreapp3.1 + net5.0 Kyoo.CommonApi Kyoo.CommonApi Kyoo.CommonApi - AnonymusRaccoon + Zoe Roux + https://github.com/AnonymusRaccoon/Kyoo Library + default diff --git a/Kyoo.CommonAPI/LocalRepository.cs b/Kyoo.CommonAPI/LocalRepository.cs index e40bc9a1..381bfb44 100644 --- a/Kyoo.CommonAPI/LocalRepository.cs +++ b/Kyoo.CommonAPI/LocalRepository.cs @@ -234,7 +234,7 @@ namespace Kyoo.Controllers && !typeof(string).IsAssignableFrom(x.PropertyType))) { object value = property.GetValue(resource); - if (value == null || value is ICollection || Utility.IsOfType(value, typeof(ICollection<>))) + if (value == null || value is ICollection || Utility.IsOfGenericType(value, typeof(ICollection<>))) continue; value = Utility.RunGenericMethod(typeof(Enumerable), "ToList", Utility.GetEnumerableType((IEnumerable)value), value); property.SetValue(resource, value); diff --git a/Kyoo/Kyoo.csproj b/Kyoo/Kyoo.csproj index c73f5ad2..68eb1989 100644 --- a/Kyoo/Kyoo.csproj +++ b/Kyoo/Kyoo.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 true Latest false @@ -13,7 +13,7 @@ false SDG - Anonymus-Raccoon + Zoe Roux https://github.com/AnonymusRaccoon/Kyoo Kyoo.Program default