public override void Deserialize(MySpace.Common.IO.IPrimitiveReader reader)
		{
			base.Deserialize(reader);

			ushort count = reader.ReadUInt16();
			if (count > 0)
			{
				string key;
				byte[] value;
				for (int i = 0; i < count; i++)
				{
					key = reader.ReadString();
					value = reader.ReadBytes(reader.ReadUInt16());
					sortFields.Add(key, value);
				}
			}
		}
        public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader, int version)
        {
			this.ContainsCacheListNode = reader.ReadBoolean();
			this.ListExists = reader.ReadBoolean();
			this.ListMetadata = reader.ReadBytes(reader.ReadInt32());
			this.CacheListTotalCount = reader.ReadInt32();
			int count = reader.ReadInt32();

            if (version >= 2)
            {
                this.CacheList = DeserializeListV2(reader, count);
                this.VirtualListCount = reader.ReadInt32();
            }
            else
            {
                this.CacheList = DeserializeListV1(reader, count);
            }
        }
Example #3
0
		public override void Deserialize(MySpace.Common.IO.IPrimitiveReader reader)
		{
			base.Deserialize(reader);

			ushort Count = reader.ReadUInt16();
			if (Count > 0)
			{
				data = reader.ReadBytes(Count);
			}
		}
		public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader, int version)
		{
            //IndexExists
            indexExists = reader.ReadBoolean();

            //IndexSize
            indexSize = reader.ReadInt32();

            //Metadata
            ushort len = reader.ReadUInt16();
            if (len > 0)
            {
                metadata = reader.ReadBytes(len);
            }

            //ResultItemList
            int listCount = reader.ReadInt32();
            resultItemList = new List<ResultItem>(listCount);
            if (listCount > 0)
            {
                ResultItem resultItem;
                for (int i = 0; i < listCount; i++)
                {
                    resultItem = new ResultItem();
                    resultItem.Deserialize(reader);
                    resultItemList.Add(resultItem);
                }
            }

            //ExceptionInfo
            exceptionInfo = reader.ReadString();

            //VirtualCount
            if (version >= 2)
            {
                virtualCount = reader.ReadInt32();
            }
		}
Example #5
0
		public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader)
		{
			indexId = reader.ReadBytes(reader.ReadInt32());
			cacheDataList = DeserializeList(reader, indexId);
			cacheDataDeleteList = DeserializeList(reader, indexId);
		}
 private void DeserializeListV2(MySpace.Common.IO.IPrimitiveReader reader, int count)
 {
     for (int i = 0; i < count; i++)
     {
         this.cacheListNodeIds[i] = reader.ReadBytes(reader.ReadInt32());
     }
 }
		public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader)
		{
			this.totalCount = reader.ReadInt32();
			int count = reader.ReadInt32();
			cacheDataList = new List<CacheData>(count);
			if (count > 0)
			{
				int IndexIdLen = reader.ReadInt32();
				int IdLen = reader.ReadInt32();
				
				for (int i = 0; i < count; i++)
				{					
					cacheDataList.Add(
						new CacheData(
							reader.ReadBytes(IndexIdLen),							// IndexId
							reader.ReadBytes(IdLen),								// Id
							reader.ReadBytes(reader.ReadInt32()),					// Data
							new SmallDateTime(reader.ReadInt32()).FullDateTime,		// CreateTimeStamp
							reader.ReadInt32()));									// CacheTypeId
				}
			}			
		}
		public virtual void Deserialize(MySpace.Common.IO.IPrimitiveReader reader)
		{
			ushort indexIdLength = reader.ReadUInt16();
			if (indexIdLength > 0)
			{
				indexId = reader.ReadBytes(indexIdLength);
			}

			ushort idLength = reader.ReadUInt16();
			if (idLength > 0)
			{
				id = reader.ReadBytes(idLength);
			}

			ushort cacheTypeLength = reader.ReadUInt16();
			if (cacheTypeLength > 0)
			{
				cacheType = reader.ReadBytes(cacheTypeLength);
			}
		}
Example #9
0
		public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader, int version)
		{
            this.ListId = reader.ReadBytes(reader.ReadInt32());
            this.TTLSeconds = reader.ReadDouble();
            this.UpdateListMetadata = reader.ReadBoolean();
            this.ListMetadata = reader.ReadBytes(reader.ReadInt32());
			this.addList = DeserializeList(reader);
			this.deleteList = DeserializeList(reader);

            if (version >= 2)
                this.ClearList = reader.ReadBoolean();

            if (version >= 3)
                this.ReplaceList = reader.ReadBoolean();

            if (version >= 4)
                this.VirtualListCount = reader.ReadInt32();

            if (version >= 5)
                this.PrimaryId = reader.ReadInt32();
		}
Example #10
0
        public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader)
        {
            //FieldName
            fieldName = reader.ReadString();

            //IsTag
            isTag = reader.ReadBoolean();

            //Operation
            operation = (Operation)reader.ReadByte();

            //Value
            ushort len = reader.ReadUInt16();
            if (len > 0)
            {
                value = reader.ReadBytes(len);
            }

            //DataType
            dataType = (DataType)reader.ReadByte();
        }
Example #11
0
		public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader)
		{
			int Count = reader.ReadInt32();
			if (Count > 0)
			{
				data = reader.ReadBytes(Count);
			}
		}
 private void DeserializeListV2(MySpace.Common.IO.IPrimitiveReader reader, int numExcludedIds)
 {
     //support variable size node id length
     for (int i = 0; i < numExcludedIds; i++)
     {
         this.excludedIds[i] = reader.ReadBytes(reader.ReadInt32());
     }
 }
 private void DeserializeListV1(MySpace.Common.IO.IPrimitiveReader reader, int numExcludedIds)
 {
     //support fixed size node id length
     int idLength = reader.ReadInt32();
     for (int i = 0; i < numExcludedIds; i++)
     {
         this.excludedIds[i] = reader.ReadBytes(idLength);
     }
 }
        public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader, int version)
        {
			this.cacheListId = reader.ReadBytes(reader.ReadInt32());
			this.startIndex = reader.ReadInt32();
			this.count = reader.ReadInt32();
			int numExcludedIds = reader.ReadInt32();

            if (version >= 2)
            {
                if (numExcludedIds > 0)
                {
                    this.excludedIds = new byte[numExcludedIds][];
                    DeserializeListV2(reader, numExcludedIds);
                }
                this.VirtualListCount = reader.ReadInt32();
                if (version >= 3)
                    this.PrimaryId = reader.ReadInt32();
            }
            else
            {
                if (numExcludedIds > 0)
                {
                    this.excludedIds = new byte[numExcludedIds][];
                    DeserializeListV1(reader, numExcludedIds);
                }
            }
        }
        private static List<CacheListNode> DeserializeListV2(MySpace.Common.IO.IPrimitiveReader reader, int count)
        {
            List<CacheListNode> list = new List<CacheListNode>();
            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    list.Add(new CacheListNode(
                        reader.ReadBytes(reader.ReadInt32()),					// nodeId						
                        reader.ReadBytes(reader.ReadInt32()),					// data
                        reader.ReadInt32()));	// timestamp
                }
            }

            return list;
        }
        public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader, int version)
        {
			this.CacheListId = reader.ReadBytes(reader.ReadInt32());
			this.CacheListNodeId = reader.ReadBytes(reader.ReadInt32());
			if(version>=2)
				this.virtualListCount = reader.ReadInt32();
            if (version >= 3)
                this.PrimaryId = reader.ReadInt32();
        }
        public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader, int version)
        {
			this.cacheListId = reader.ReadBytes(reader.ReadInt32());

			int count = reader.ReadInt32();

            if (version >= 2)
            {
                if (count > 0)
                {
                    this.cacheListNodeIds = new byte[count][];
                    DeserializeListV2(reader, count);
                }
                this.VirtualListCount = reader.ReadInt32();
                if (version >= 3)
                    this.PrimaryId = reader.ReadInt32();
            }
            else
            {
                if (count > 0)
                {
                    this.cacheListNodeIds = new byte[count][];
                    DeserializeListV1(reader, count);
                }
            }
        }
Example #18
0
		private static List<CacheData> DeserializeList(MySpace.Common.IO.IPrimitiveReader reader, byte[] indexId)
		{			
			int count = reader.ReadInt32();
			List<CacheData> list = new List<CacheData>();
			if (count > 0)
			{
				for (int i = 0; i < count; i++)
				{
					list.Add(new CacheData(
						indexId, 
						reader.ReadBytes(reader.ReadInt32()), 
						reader.ReadBytes(reader.ReadInt32()), 
						new SmallDateTime(reader.ReadInt32()).FullDateTime,
						reader.ReadInt32() ));
				}
			}

			return list;
		}
        public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader, int version)
        {
			this.CacheListId = reader.ReadBytes(reader.ReadInt32());
			this.PageSize = reader.ReadInt32();
			this.PageNum = reader.ReadInt32();
			this.ReversePagedQuery = reader.ReadBoolean();
			if(version>=2)
				this.VirtualListCount = reader.ReadInt32();
            if (version >= 3)
                this.PrimaryId = reader.ReadInt32();
        }
		public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader)
		{
			cacheDataReferenceType = (CacheDataReferenceTypes) reader.ReadByte();
			indexId = reader.ReadBytes(reader.ReadUInt16());
			id = reader.ReadBytes(reader.ReadUInt16());
			cacheType = reader.ReadBytes(reader.ReadUInt16());
			returnAllSortFields = reader.ReadBoolean();
			preferredIndexName = reader.ReadString();
			metadataRequested = reader.ReadBoolean();
		}