Including tools into codegen
This commit is contained in:
1 parent
745def1365
commit
f31ddf1604
22 files changed
+78
-574
No files matched your search
@@ -1,39 +0,0 @@
|
||||
namespace mROA.Codegen.Tools
|
||||
{
|
||||
public class LinkTemplateSection : ITemplateSection, IBaking
|
||||
{
|
||||
public LinkTemplateSection(string linkedTag, TemplateDocument context)
|
||||
{
|
||||
LinkedTag = linkedTag;
|
||||
Context = context;
|
||||
}
|
||||
|
||||
public string LinkedTag { get; }
|
||||
|
||||
public string Bake()
|
||||
{
|
||||
return Context[LinkedTag]?.ToString();
|
||||
}
|
||||
|
||||
public TemplateDocument Context { get; set; }
|
||||
|
||||
public int TargetLength
|
||||
{
|
||||
get
|
||||
{
|
||||
var attached = Context[LinkedTag];
|
||||
return attached?.TargetLength ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return new LinkTemplateSection(LinkedTag, Context);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{nameof(LinkedTag)}: {LinkedTag}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user