コード例 #1
0
 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]);
     }
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        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]);
                }
            }
        }
コード例 #4
0
        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);
                }
            }
        }
コード例 #5
0
        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);
                }
            }
        }