Пример #1
0
        internal AttributeList(ResidentHeader header, byte[] attrBytes, string attrName)
        {
            Name = (Attr.ATTR_TYPE)header.commonHeader.ATTRType;
            NameString = attrName;
            NonResident = header.commonHeader.NonResident;
            AttributeId = header.commonHeader.Id;

            #region AttributeReference

            int i = 0;
            List<AttrRef> refList = new List<AttrRef>();

            while (i < attrBytes.Length)
            {
                AttrRef attrRef = new AttrRef(NativeMethods.GetSubArray(attrBytes, (uint)i, (uint)BitConverter.ToUInt16(attrBytes, i + 0x04)));
                refList.Add(attrRef);
                i += attrRef.RecordLength;
            }
            AttributeReference = refList.ToArray();

            #endregion AttributeReference
        }
Пример #2
0
        internal AttributeList(ResidentHeader header, byte[] attrBytes, string attrName)
        {
            Name        = (Attr.ATTR_TYPE)header.commonHeader.ATTRType;
            NameString  = attrName;
            NonResident = header.commonHeader.NonResident;
            AttributeId = header.commonHeader.Id;

            #region AttributeReference

            int            i       = 0;
            List <AttrRef> refList = new List <AttrRef>();

            while (i < attrBytes.Length)
            {
                AttrRef attrRef = new AttrRef(NativeMethods.GetSubArray(attrBytes, (uint)i, (uint)BitConverter.ToUInt16(attrBytes, i + 0x04)));
                refList.Add(attrRef);
                i += attrRef.RecordLength;
            }
            AttributeReference = refList.ToArray();

            #endregion AttributeReference
        }