コード例 #1
0
        protected override void ResetObject(object obj)
        {
            HDR hdr = obj as HDR;

            if (hdr != null)
            {
                hdr.Reset();
            }
        }
コード例 #2
0
        public static HDR ReadTotalHeader(CompactReader reader)
        {
            byte isNull = reader.ReadByte();

            if (isNull == 1)
            {
                return(null);
            }
            HDR newHdr = new HDR();

            newHdr.Deserialize(reader);
            return(newHdr);
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        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);
        }