2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00
This commit is contained in:
2022-08-25 02:19:42 +03:00
parent acc2a546cf
commit ca859b3433
5 changed files with 8 additions and 32 deletions

View File

@ -176,7 +176,8 @@ public static class DataDeserializer
{
try
{
var v = Convert.ChangeType(ar[i], template.Properties[i].PropertyInfo.PropertyType);
//var v = Convert.ChangeType(ar[i], template.Properties[i].PropertyInfo.PropertyType);
var v = DC.CastConvert(ar[i], template.Properties[i].PropertyInfo.PropertyType);
template.Properties[i].PropertyInfo.SetValue(record, v);
}
catch (Exception ex)

View File

@ -6,7 +6,7 @@
<Copyright>Ahmed Kh. Zamil</Copyright>
<PackageProjectUrl>http://www.esiur.com</PackageProjectUrl>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>2.2.9</Version>
<Version>2.3.0</Version>
<RepositoryUrl>https://github.com/esiur/esiur-dotnet</RepositoryUrl>
<Authors>Ahmed Kh. Zamil</Authors>
<AssemblyVersion></AssemblyVersion>

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2017-2021 Esiur Foundation, Ahmed Kh. Zamil.
Copyright (c) 2017-2022 Esiur Foundation, Ahmed Kh. Zamil.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -590,7 +590,8 @@ public class TypeTemplate
if (classIsPublic)
{
var mis = type.GetMembers(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)
var mis = type.GetMembers(BindingFlags.Public | BindingFlags.Instance
| BindingFlags.DeclaredOnly | BindingFlags.Static)
.Where(x => x.MemberType == MemberTypes.Property || x.MemberType == MemberTypes.Field
|| x.MemberType == MemberTypes.Event || x.MemberType == MemberTypes.Method)
.Where(x => !(x is FieldInfo c && !c.IsStatic))