public void Add(Command cmd) { lock (queueLock) { buffer.AddLast (cmd); while (buffer.Count > Size) buffer.RemoveFirst (); } }
internal void AddCommand(Command command) { buffer.Add (command); var evt = CommandDetected; if (evt != null) evt (command); var matched = buffer.FindEggs (Eggs); if (matched == null) return; foreach (var m in matched) { var evt2 = EggDetected; if (evt2 != null) evt2 (m); } }