Пример #1
0
        /// <summary>
        ///    Renders the current instance as a raw Flac metadata
        ///    block.
        /// </summary>
        /// <param name="isLastBlock">
        ///    A <see cref="bool" /> value indicating whether or not the
        ///    block is to be marked as the last metadata block.
        /// </param>
        /// <returns>
        ///    A <see cref="ByteVector" /> object containing the
        ///    rendered version of the current instance.
        /// </returns>
        public ByteVector Render(bool isLastBlock)
        {
            if (this.data == null)
            {
                throw new InvalidOperationException(
                          "Cannot render empty blocks.");
            }

            ByteVector data = header.Render(isLastBlock);

            data.Add(this.data);
            return(data);
        }