Example #1
0
File: Data.cs Project: muyen2/MFT-1
        public Data(byte[] rawBytes) : base(rawBytes)
        {
            if (IsResident)
            {
                var content = new byte[AttributeContentLength];

                Buffer.BlockCopy(rawBytes, ContentOffset, content, 0, AttributeContentLength);

                ResidentData = new ResidentData(content);
            }
            else
            {
                NonResidentData = new NonResidentData(rawBytes);
            }
        }
Example #2
0
        public SecurityDescriptor(byte[] rawBytes) : base(rawBytes)
        {
            if (NonResident)
            {
                NonResidentData = new NonResidentData(rawBytes);
            }
            else
            {
                var content = new byte[AttributeContentLength];

                Buffer.BlockCopy(rawBytes, ContentOffset, content, 0, AttributeContentLength);

                ResidentData = new ResidentData(content);
            }

            if (NonResident)
            {
                return;
            }

            SecurityInfo = new SKSecurityDescriptor(ResidentData.Data);
        }
Example #3
0
 public IndexAllocation(byte[] rawBytes) : base(rawBytes)
 {
     var NonResidentData = new NonResidentData(rawBytes);
 }