private IEnumerable <KeyPress> ToEnumerable(KeyProvider provider, KeyPlayer player) { var keys = new List <KeyPress>(); provider.Subscribe(keys.Add); player.Play(); return(keys); }