Ejemplo n.º 1
0
        public override void ReadBody(NdrBinaryStream stream)
        {
            stream.Seek(4); // offset for Id

            Type = (ClaimType)stream.ReadShort();

            stream.Align(4);

            Count = stream.ReadUnsignedInt();

            stream.Seek(4); // offset to values
        }
Ejemplo n.º 2
0
        public override void ReadBody(NdrBinaryStream stream)
        {
            ClaimSource = (ClaimSourceType)stream.ReadInt();
            Count       = stream.ReadUnsignedInt();

            var claims = new List <ClaimEntry>();

            stream.Seek(4);

            var count = stream.ReadInt();

            if (Count != count)
            {
                throw new InvalidDataException($"Claims count {Count} doesn't match actual count {count}");
            }

            for (var i = 0; i < Count; i++)
            {
                var claim = new ClaimEntry();
                claim.ReadBody(stream);

                claims.Add(claim);
            }

            foreach (var entry in claims)
            {
                entry.ReadValue(stream);
            }

            ClaimEntries = claims;
        }
Ejemplo n.º 3
0
        public override void ReadBody(NdrBinaryStream stream)
        {
            Count = stream.ReadInt();

            stream.Seek(4);

            ReservedType      = stream.ReadShort();
            ReservedFieldSize = stream.ReadInt();

            ReservedField = stream.Read(ReservedFieldSize);

            stream.Align(8);

            ClaimsArray = ReadClaimsArray(stream);
        }