using System; using System.Collections; using System.Collections.Generic; using Timer = System.Timers.Timer; using System.Timers; using System.Threading; namespace BITKit.IData { public class DataRecorder : Player { public int minLength; public event Action> output; protected override void OnUpdate() { list.Add(current); } protected override void OnStart() { list.Clear(); } protected override void OnStop() { if (list.Count >= minLength) output.Invoke(list); list.Clear(); } } }