コード例 #1
0
        /// <summary>
        /// Creates a track chunk with the specified chords.
        /// </summary>
        /// <param name="chords">Collection of chords to create a track chunk.</param>
        /// <returns><see cref="TrackChunk"/> containing the specified chords.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="chords"/> is null.</exception>
        public static TrackChunk ToTrackChunk(this IEnumerable<Chord> chords)
        {
            ThrowIfArgument.IsNull(nameof(chords), chords);

            var trackChunk = new TrackChunk();
            trackChunk.AddChords(chords);

            return trackChunk;
        }