2025-03-19 23:18:26 +03:00
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace mROA.CodegenTools
|
|
|
|
|
{
|
2025-03-23 19:32:41 +03:00
|
|
|
public class DefineTemplateSection : ITagged
|
2025-03-19 23:18:26 +03:00
|
|
|
{
|
|
|
|
|
public TemplateDocument Context { get; set; }
|
|
|
|
|
public string StoredText { get; }
|
2025-03-19 23:21:00 +03:00
|
|
|
private readonly string _tag;
|
2025-03-19 23:18:26 +03:00
|
|
|
|
2025-03-20 16:36:32 +03:00
|
|
|
public DefineTemplateSection(string storedText, string tag, TemplateDocument context)
|
2025-03-19 23:18:26 +03:00
|
|
|
{
|
|
|
|
|
StoredText = storedText;
|
2025-03-19 23:21:00 +03:00
|
|
|
_tag = tag;
|
|
|
|
|
Context = context;
|
2025-03-19 23:18:26 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Tag => _tag;
|
2025-03-19 23:42:25 +03:00
|
|
|
public int TargetLength => StoredText.Length;
|
|
|
|
|
|
2025-03-19 23:18:26 +03:00
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
2025-03-24 10:37:19 +03:00
|
|
|
return StoredText;
|
2025-03-19 23:18:26 +03:00
|
|
|
}
|
2025-03-25 20:00:08 +03:00
|
|
|
|
|
|
|
|
public object Clone()
|
|
|
|
|
{
|
|
|
|
|
return new DefineTemplateSection(StoredText, _tag, Context);
|
|
|
|
|
}
|
2025-03-19 23:18:26 +03:00
|
|
|
}
|
|
|
|
|
}
|