protected override void ResetObject(object obj) { HDR hdr = obj as HDR; if (hdr != null) { hdr.Reset(); } }
public static HDR ReadTotalHeader(CompactReader reader) { byte isNull = reader.ReadByte(); if (isNull == 1) { return(null); } HDR newHdr = new HDR(); newHdr.Deserialize(reader); return(newHdr); }
public static void WriteTotalHeader(CompactWriter writer, HDR hdr) { byte isNull = 1; if (hdr == null) { writer.Write(isNull); } else { isNull = 0; writer.Write(isNull); hdr.Serialize(writer); } return; }
public override object Clone(ObjectProvider provider) { HDR hdr = null; if (provider != null) { hdr = (HDR)provider.RentAnObject(); } else { hdr = new HDR(); } hdr.type = this.type; hdr.seqID = seqID; hdr.localSeqID = localSeqID; hdr.viewId = viewId; return(hdr); }