public Firmware(Program program, Action <TriggerSet> configureAction) { if (Instance != null) { throw new InvalidOperationException(); } Instance = this; Program = program; TimingManager = new TimingManager(Program.Runtime); var triggerSet = new TriggerSet(); configureAction(triggerSet); _argumentTriggers = triggerSet.Triggers.OfType <ArgumentTrigger>().ToList(); _triggers = triggerSet.Triggers.Where(x => !(x is ArgumentTrigger)).ToList(); }
public Program() { Runtime.UpdateFrequency = Frequency; _firmware = new Firmware(this, Configure); }