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(); }
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); } //FirstPageResultItemList int listCount = reader.ReadInt32(); firstPageResultItemList = new List <ResultItem>(listCount); if (listCount > 0) { ResultItem resultItem; for (int i = 0; i < listCount; i++) { resultItem = new ResultItem(); resultItem.Deserialize(reader); firstPageResultItemList.Add(resultItem); } } //LastPageResultItemList listCount = reader.ReadInt32(); lastPageResultItemList = new List <ResultItem>(listCount); if (listCount > 0) { ResultItem resultItem; for (int i = 0; i < listCount; i++) { resultItem = new ResultItem(); resultItem.Deserialize(reader); lastPageResultItemList.Add(resultItem); } } //ExceptionInfo exceptionInfo = reader.ReadString(); //VirtualCount if (version >= 2) { virtualCount = reader.ReadInt32(); } }
public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader) { totalCount = reader.ReadInt32(); int resultListCount = reader.ReadInt32(); if (resultListCount > 0) { for (int i = 0; i < resultListCount; i++) { TItem cdr = new TItem(); cdr.Deserialize(reader); resultList.Add(cdr); } } ushort resultMetadataCount = reader.ReadUInt16(); if (resultMetadataCount > 0) { byte[] key; byte[] value; ushort keyLength; ushort valueLength; for (int i = 0; i < resultMetadataCount; i++) { key = value = null; keyLength = reader.ReadUInt16(); if (keyLength > 0) { key = reader.ReadBytes(keyLength); } valueLength = reader.ReadUInt16(); if (valueLength > 0) { value = reader.ReadBytes(valueLength); } if (key != null) { resultMetadata.Add(key, value); } } } sortDescriptor = reader.ReadString(); cacheDataReferenceType = (CacheDataReferenceTypes)reader.ReadByte(); }
public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader, int version) { if (reader.ReadBoolean()) { int groupsCount = reader.ReadInt32(); ErrorQueues = new Dictionary <string, Dictionary <string, ErrorQueue> >(groupsCount); for (int i = 0; i < groupsCount; i++) { string group = reader.ReadString(); if (reader.ReadBoolean()) { int serviceCount = reader.ReadInt32(); Dictionary <string, ErrorQueue> groupQueues = new Dictionary <string, ErrorQueue>(serviceCount); for (int j = 0; j < serviceCount; j++) { string serviceName = reader.ReadString(); groupQueues.Add(serviceName, reader.Read <ErrorQueue>()); } ErrorQueues.Add(group, groupQueues); } } } }
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) { HomeDirectory = reader.ReadString(); //try //{ // //string str = reader.ReadString(); // //XmlSerializer XmlSerializer = new XmlSerializer(typeof(CacheIndexV3StorageConfiguration)); // //UTF8Encoding encoding = new UTF8Encoding(); // //byte[] buffer = encoding.GetBytes(str); // //MemoryStream memoryStream = new MemoryStream(buffer); // //XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8); // //StorageConfiguration = (CacheIndexV3StorageConfiguration)XmlSerializer.Deserialize(memoryStream); //} //catch //{ // LoggingWrapper.Write("Unable to deserialize CacheIndexV3StorageConfiguration object"); // throw new ApplicationException("Unable to deserialize CacheIndexV3StorageConfiguration object"); //} }
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(); }