2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00

Resource Proxy

This commit is contained in:
2019-07-23 06:22:24 +03:00
parent 2d9f61c0d9
commit a2f4238933
12 changed files with 238 additions and 23 deletions

View File

@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@ -17,6 +18,12 @@ namespace Esiur.Resource.Template
}
public PropertyInfo Info
{
get;
set;
}
//bool ReadOnly;
//IIPTypes::DataType ReturnType;
public PropertyPermission Permission {

View File

@ -126,6 +126,10 @@ namespace Esiur.Resource.Template
public ResourceTemplate(Type type)
{
if (type.Namespace.Contains("Esiur.Proxy.T"))
type = type.GetTypeInfo().BaseType;
// set guid
var typeName = Encoding.UTF8.GetBytes(type.FullName);
@ -156,7 +160,8 @@ namespace Esiur.Resource.Template
if (ps.Length > 0)
{
var pt = new PropertyTemplate(this, i++, pi.Name, ps[0].ReadExpansion, ps[0].WriteExpansion, ps[0].Storage);
properties.Add(pt);
pt.Info = pi;
properties.Add(pt);
}
}