Esempio n. 1
0
        /// <summary>
        /// Deletes the ID3 tag of the specified version from the MP3 data.
        /// </summary>
        /// <param name="majorVersion">The major version number.</param>
        /// <param name="minorVersion">The minor version number.</param>
        public void DeleteTag(int majorVersion, int minorVersion)
        {
            EnsureWritePermissions(Id3Messages.NoWritePermissions_CannotDeleteTag);
            RegisteredId3Handler registeredHandler = ExistingHandlers.GetHandler(majorVersion, minorVersion);

            if (registeredHandler != null)
            {
                registeredHandler.Handler.DeleteTag(_stream);
                InvalidateExistingHandlers();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Retrieves an ID3 tag of the specified version number.
        /// </summary>
        /// <param name="majorVersion">The major version number.</param>
        /// <param name="minorVersion">The minor version number</param>
        /// <returns>The ID3 tag of the specified version number, or null if it doesn't exist.</returns>
        public Id3Tag GetTag(int majorVersion, int minorVersion)
        {
            RegisteredId3Handler registeredHandler = ExistingHandlers.GetHandler(majorVersion, minorVersion);

            return(registeredHandler != null?registeredHandler.Handler.ReadTag(_stream) : null);
        }