private IEnumerable <SongMeaningsSong> GetAllSongsBeneathNode(SongMeaningsNode node) { if (node.IsTerminalNode) { yield return(((SongNode)node).Song); } else { foreach (SongMeaningsNode child in node.GetChildren()) { foreach (SongMeaningsSong song in GetAllSongsBeneathNode(child)) { node.SerializeCurrentSearchProgress(); yield return(song); } } } }
private IEnumerable<SongMeaningsSong> GetAllSongsBeneathNode(SongMeaningsNode node) { if (node.IsTerminalNode) { yield return ((SongNode)node).Song; } else { foreach (SongMeaningsNode child in node.GetChildren()) { foreach (SongMeaningsSong song in GetAllSongsBeneathNode(child)) { node.SerializeCurrentSearchProgress(); yield return song; } } } }