Базовые классы для codegen-tools

This commit is contained in:
2025-03-19 23:18:26 +03:00
parent 0d17406b61
commit c36c2419a1
6 changed files with 150 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
using System.Linq;
namespace mROA.CodegenTools
{
public class LinkTemplatePart : ITemplatePart
{
private readonly string _linkedTag;
public TemplateDocument Context { get; set; }
public string LinkedTag => _linkedTag;
public string Bake()
{
return Context.Parts.OfType<ITagged>().FirstOrDefault(i => i.Tag == _linkedTag)?.Bake();
}
}
}