示例#1
0
 public DataReader(byte[] buffer, int offset, int length)
 {
     refContext = new RefrenceCollection();
     _doc       = new PacketDocument();
     _doc.Load(buffer, offset, length);
     _cur = _doc;
 }
示例#2
0
 internal PacketNode(PacketDocument doc)
 {
     if (this is PacketDocument)
     {
         this.doc = this as PacketDocument;
     }
     else
     {
         this.doc = doc;
     }
     _packet                = new Packet();
     _context               = new PackectContext(this);
     this.nodeType          = NodeType.Node;
     this.context.valueType = NodeValueType.None;
 }
示例#3
0
 internal PacketElement(PacketDocument doc) : base(doc)
 {
     this.nodeType          = NodeType.Element;
     this.context.valueType = NodeValueType.ComplexType;
 }
示例#4
0
 public DataWriter()
 {
     _doc       = new PacketDocument();
     _cur       = _doc;
     refContext = new RefrenceCollection();
 }