mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-13 10:52:28 -04:00
Switching to dotnet5 w/ C#9
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<AssemblyName>Kyoo.CommonApi</AssemblyName>
|
||||
<RootNamespace>Kyoo.CommonApi</RootNamespace>
|
||||
<PackageId>Kyoo.CommonApi</PackageId>
|
||||
<Authors>AnonymusRaccoon</Authors>
|
||||
<Authors>Zoe Roux</Authors>
|
||||
<RepositoryUrl>https://github.com/AnonymusRaccoon/Kyoo</RepositoryUrl>
|
||||
<OutputType>Library</OutputType>
|
||||
<LangVersion>default</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user