示例#1
0
		public IData Deserialize(byte[] bytes, int offset, int count)
		{
			Debug.Assert(count == 8);

			uint l_offset = OOD.Utility.Bytes.Unpack4U(bytes, offset);
			int length = OOD.Utility.Bytes.Unpack4(bytes, offset + 4);
			DSegAddr result = new DSegAddr(l_offset, length);
			return result;
		}
示例#2
0
        public IData Deserialize(byte[] bytes, int offset, int count)
        {
            Debug.Assert(count == 8);

            uint     l_offset = OOD.Utility.Bytes.Unpack4U(bytes, offset);
            int      length   = OOD.Utility.Bytes.Unpack4(bytes, offset + 4);
            DSegAddr result   = new DSegAddr(l_offset, length);

            return(result);
        }
示例#3
0
文件: KSegId.cs 项目: luanzhu/OOD.NET
        public IKey Deserialize(byte[] bytes, int offset, int count)
        {
            KSegId result = null;
            int    pos    = offset;
            uint   id     = OOD.Utility.Bytes.Unpack4U(bytes, pos);

            pos += 4;
            if (count == 4)
            {
                result = new KSegId(id);
            }
            else
            {
                int length = OOD.Utility.Bytes.Unpack2(bytes, pos);
                pos += 2;
                DSegAddr addr = new DSegAddr();
                addr   = (DSegAddr)addr.Deserialize(bytes, pos, length);
                result = new KSegId(id, addr);
            }

            return(result);
        }
示例#4
0
文件: KSegId.cs 项目: luanzhu/OOD.NET
		public KSegId(uint id, DSegAddr addr)
		{
			m_id = id;
			m_addr = addr;
		}
示例#5
0
文件: KSegId.cs 项目: luanzhu/OOD.NET
		public KSegId(uint id)
		{
			m_id = id;
			m_addr = null;
		}
示例#6
0
文件: KSegId.cs 项目: luanzhu/OOD.NET
		public IKey Deserialize(byte[] bytes, int offset, int count)
		{
			KSegId result = null;
			int pos = offset;
			uint id = OOD.Utility.Bytes.Unpack4U(bytes, pos);
			pos += 4;
			if (count == 4)
			{
				result = new KSegId(id);
			}
			else
			{
				int length = OOD.Utility.Bytes.Unpack2(bytes, pos);
				pos += 2;
				DSegAddr addr = new DSegAddr();
				addr = (DSegAddr)addr.Deserialize(bytes, pos, length);
				result = new KSegId(id, addr);
			}

			return result;
		}
示例#7
0
文件: KSegId.cs 项目: luanzhu/OOD.NET
 public KSegId(uint id, DSegAddr addr)
 {
     m_id   = id;
     m_addr = addr;
 }
示例#8
0
文件: KSegId.cs 项目: luanzhu/OOD.NET
 public KSegId(uint id)
 {
     m_id   = id;
     m_addr = null;
 }