Пример #1
0
        private void SetValueIntoTag(ID3V2 tag)
        {
            Type   tagType    = tag.GetType();
            string methodName = "Set" + _frame.Id;

            tagType.GetMethod(methodName, System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)
            .Invoke(tag, new object[] { _flagSet, _frameData });
        }
Пример #2
0
        internal void ReadFrame(ID3V2 tag, byte[] tagArray, int pointPosition)
        {
            _pointPosition = pointPosition;
            byte[] _id  = new byte[4];
            byte[] size = new byte[4];


            GetIdentificator(tagArray, _id);
            AdjustTagID();
            GetFrameSize(tagArray, size, tag.Header.TagVersion);
            if (FindId())
            {
                GetFlagsField(tagArray);
                _flagSet        = new FrameFlagSet(_flags);
                _pointPosition += _flagSet.GetExtraData(tagArray, _pointPosition);
                GetDataValue(tagArray);
                SetValueIntoTag(tag);
            }
            else
            {
                _pointPosition += this.FrameSize;
            }
        }