private void WriteDefAttributeKeyType(BamlDefAttributeKeyType node) { _blob.Write(ref _pos, (byte)RecordType.DefAttributeKeyType); _blob.Write(ref _pos, (short)GetTypeId(node.Value)); _blob.Write(ref _pos, (byte)node.TypeFlags); _pos += 4; // ValuePosition _blob.Write(ref _pos, (bool)node.Shared); _blob.Write(ref _pos, (bool)node.SharedSet); AddKey(_pos - 6, node.ValueNode); }
private void ReadDefAttributeKeyType() { var node = new BamlDefAttributeKeyType(); node.Value = GetType(_accessor.ReadInt16()); node.TypeFlags = (BamlElementFlags)_accessor.ReadByte(); int valuePosition = _accessor.ReadInt32(); node.Shared = _accessor.ReadBoolean(); node.SharedSet = _accessor.ReadBoolean(); AddNode(node); AddKey(node, valuePosition); }