private void WriteNamedElement(BamlNamedElement node) { _blob.Write(ref _pos, (byte)RecordType.NamedElementStart); _blob.Write(ref _pos, (short)GetTypeId(node.Type)); _blob.WriteLengthPrefixedString(ref _pos, (string)node.RuntimeName); BeginScope(node, RecordType.ElementEnd); }
private void ReadNamedElement() { var node = new BamlNamedElement(); node.Type = GetType(_accessor.ReadInt16()); node.RuntimeName = _accessor.ReadLengthPrefixedString(Encoding.UTF8); AddNode(node); BeginScope(node, RecordType.ElementEnd); }