public void BuildPackets() { Packets.Clear(); if (_data.Count > 1) { Packets.AddRange(Tools.Builder.GetPackets(_data, Options)); PacketsBuilt?.Invoke(this, new PacketsBuiltEventArgs(Packets)); } }
public XModemCommunicator() { _context.PacketsBuilt += (s, e) => { PacketsBuilt?.Invoke(this, e); }; _context.StateUpdated += (s, e) => { StateUpdated?.Invoke(this, e); }; _context.ModeUpdated += (s, e) => { ModeUpdated?.Invoke(this, e); }; }