public void Write(Stream writer) { writer.WriteString(ParentPath); writer.WriteInt32(_children.Count); for (int i = 0; i < _children.Count; i++) { ExtensionBuilderRecordHelper.Write(writer, _children[i]); } }
public void Read(Stream reader) { ParentPath = reader.ReadString(); var extensionPointId = StringHelper.GetExtensionPointId(ParentPath); var childCount = reader.ReadInt32(); _children = new List <ExtensionBuilderRecord>(childCount); for (int i = 0; i < childCount; i++) { var child = ExtensionBuilderRecordHelper.Read(reader, extensionPointId, ParentPath); child.Read(reader); Children.Add(child); } }
public virtual void Write(Stream writer) { DoWrite(writer); if (_children == null || _children.Count == 0) { writer.WriteInt32(0); } else { writer.WriteInt32(_children.Count); for (int i = 0; i < _children.Count; i++) { ExtensionBuilderRecordHelper.Write(writer, _children[i]); } } }
public virtual void Read(Stream reader) { DoRead(reader); var childCount = reader.ReadInt32(); if (childCount > 0) { _children = new List <ExtensionBuilderRecord>(childCount); for (int i = 0; i < childCount; i++) { var child = ExtensionBuilderRecordHelper.Read(reader, Id, Id); child.Read(reader); _children.Add(child); } } }
public override void Read(Stream reader) { DoRead(reader); var thisPath = GetPath(); var childCount = reader.ReadInt32(); if (childCount > 0) { _children = new List <ExtensionBuilderRecord>(childCount); for (int i = 0; i < childCount; i++) { var child = ExtensionBuilderRecordHelper.Read(reader, ExtensionPointId, thisPath); child.Read(reader); _children.Add(child); } } }