Skip to content

Commit

Permalink
rcc now can render generics (disregards generic declaration)
Browse files Browse the repository at this point in the history
  • Loading branch information
PTKu committed Oct 19, 2023
1 parent 6a50e45 commit 47bc582
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,24 @@ private IRenderableComponent GetComponent(Type twinType, ITwinElement twin, stri
return primitiveComponent;
}
default:
var name = $"{namespc}.{twinType.Name}";
var name = $"{namespc}.{FilterOutGeneric(twinType.Name)}";
var buildedComponentName = $"{name}{presentationName}View";
var defaultComponent = ComponentService.GetComponent(buildedComponentName);
SubscribeForPolling(defaultComponent, twin);
return defaultComponent;
}
}

private string FilterOutGeneric(string twinTypeName)
{
int indexOfBacktick = twinTypeName.IndexOf('`');
if (indexOfBacktick >= 0)
{
return twinTypeName.Substring(0, indexOfBacktick);
}
return twinTypeName;
}

private bool HasReadAccess(ITwinPrimitive kid) => kid.ReadWriteAccess == ReadWriteAccess.Read;

private bool CheckForArray(ITwinObject twinObject)
Expand Down
3 changes: 2 additions & 1 deletion src/AXSharp.compiler/src/ixc/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
"ixc-simple-template": {
"commandName": "Project",
"workingDirectory": "C:\\W\\Develop\\gh\\ix-ax\\axopen\\src\\templates.simple\\ctrl\\"
"commandLineArgs": "-b",
"workingDirectory": "C:\\W\\Develop\\gh\\ix-ax\\axopen\\src\\templates.simple\\app\\"
},
"ixc-template-ref": {
"commandName": "Project",
Expand Down

0 comments on commit 47bc582

Please sign in to comment.