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

TemplateType.Wrapper Removed

This commit is contained in:
2022-09-06 23:29:32 +03:00
parent 620dbaf653
commit 77f7d1d545

View File

@ -2266,8 +2266,8 @@ partial class DistributedConnection
if (resource == null) if (resource == null)
{ {
template = Warehouse.GetTemplateByClassId(classId, TemplateType.Wrapper); template = Warehouse.GetTemplateByClassId(classId, TemplateType.Resource);
if (template?.DefinedType != null) if (template?.DefinedType != null && template.IsWrapper)
dr = Activator.CreateInstance(template.DefinedType, this, id, (ulong)rt[1], (string)rt[2]) as DistributedResource; dr = Activator.CreateInstance(template.DefinedType, this, id, (ulong)rt[1], (string)rt[2]) as DistributedResource;
else else
dr = new DistributedResource(this, id, (ulong)rt[1], (string)rt[2]); dr = new DistributedResource(this, id, (ulong)rt[1], (string)rt[2]);