19 lines
682 B
C#
19 lines
682 B
C#
namespace Beam {
|
|
public struct PackagedSourceLinkGenerationData {
|
|
public string Template { get; set; }
|
|
public int IndexOfChapterIndex { get; set; }
|
|
|
|
public readonly DocumentSourceLink GenerateLink(params object[] ps)
|
|
=> new(string.Format(Template, ps));
|
|
public IncrementationBehaviour GetBehaviour() {
|
|
return new IncrementationBehaviour() {
|
|
Map = new Dictionary<int, Incrementor>() { {
|
|
IndexOfChapterIndex,
|
|
(x, i) => int.Parse(x.ToString() ?? throw new ArgumentException()) + i
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|