using System; using System.Text.RegularExpressions; using MfGames.Gallium; using MfGames.Nitride.Generators; namespace MfGames.Nitride.Temporal.Schedules; /// /// A schedule that uses the `UPath` of the entity to determine an offset from /// a starting point and calculates the information from there. /// [WithProperties] public partial class NumericalPathSchedule { public NumericalPathSchedule() { this.PathRegex = new Regex(@"^.*(\d+)"); this.GetPath = (entity) => entity.Get().ToString(); this.CaptureGroup = 1; this.CaptureOffset = -1; } public Regex? PathRegex { get; set; } public Func GetPath { get; set; } public DateTime? ScheduleStart { get; set; } public SchedulePeriod SchedulePeriod { get; set; } public int CaptureGroup { get; set; } public int CaptureOffset { get; set; } }