mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-05-06 03:32:57 +00:00
FromDynamic
This commit is contained in:
parent
b61df304ea
commit
df88317b1f
@ -32,6 +32,7 @@ using Esiur.Data;
|
||||
using Esiur.Misc;
|
||||
using Esiur.Core;
|
||||
using System.Reflection;
|
||||
using System.Dynamic;
|
||||
|
||||
namespace Esiur.Data
|
||||
{
|
||||
@ -85,6 +86,14 @@ namespace Esiur.Data
|
||||
return rt;
|
||||
}
|
||||
|
||||
public static Structure FromDynamic(ExpandoObject obj)
|
||||
{
|
||||
var rt = new Structure();
|
||||
foreach (var kv in obj)
|
||||
rt[kv.Key] = kv.Value;
|
||||
return rt;
|
||||
}
|
||||
|
||||
public static Structure FromObject(object obj)
|
||||
{
|
||||
var type = obj.GetType();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Description>Distributed Resources Platform</Description>
|
||||
<Copyright>Ahmed Kh. Zamil</Copyright>
|
||||
<PackageLicenseUrl>https://github.com/Esiur/Esiur-dotnet/blob/master/LICENSE</PackageLicenseUrl>
|
||||
|
Loading…
x
Reference in New Issue
Block a user