Beispiel #1
0
        protected ID3Tag(ID3Tag tag)
        {
            if (tag == null)
            {
                throw new ArgumentNullException("tag");
            }

            this.Album       = tag.Album;
            this.Artist      = tag.Artist;
            this.Comments    = tag.Comments;
            this.GenreAsInt  = tag.GenreAsInt;
            this.Title       = tag.Title;
            this.TrackNumber = tag.TrackNumber;
            this.Year        = tag.Year;
        }
Beispiel #2
0
        /// <summary>
        /// Copy constructor.
        /// </summary>
        /// <param name="tag">The tag to copy.</param>
        public ID3v2Tag(ID3Tag tag)
            : base(tag)
        {
            ID3v2Tag v2Tag = tag as ID3v2Tag;

            if (v2Tag != null)
            {
                this.paddingSize = v2Tag.paddingSize;
                this.headerFlags = v2Tag.headerFlags;

                this.frames = new Dictionary <FrameType, ID3v2Frame>(v2Tag.FrameCount);
                foreach (ID3v2Frame frame in v2Tag.Frames)
                {
                    this.AddFrame(frame.Copy());
                }
            }
        }
Beispiel #3
0
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="tag">The tag to copy.</param>
 public ID3v1Tag(ID3Tag tag)
     : base(tag)
 {
 }