Esempio n. 1
0
 public PageIndexSortableDataReferenceQueryResult(
     List <SortableCacheDataReference> resultList,
     Dictionary <byte[] /*IndexId*/, byte[] /*metadata*/> resultMetadata,
     int totalCount,
     string sortDescriptor,
     CacheDataReferenceTypes cacheDataReferenceType)
     : base(resultList, resultMetadata, totalCount, sortDescriptor, cacheDataReferenceType)
 {
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 public ContainsIndexQuery()
 {
     this.cacheDataReferenceType = CacheDataReferenceTypes.CacheData;
     this.indexId             = null;
     this.id                  = null;
     this.cacheType           = null;
     this.preferredIndexName  = null;
     this.returnAllSortFields = false;
     this.metadataRequested   = false;
 }
Esempio n. 4
0
        public PagedIndexQueryResult()
        {
            this.resultList = new List <TItem>();
            ByteArrayEqualityComparer byteArrayEqualityComparer = new ByteArrayEqualityComparer();

            this.resultMetadata         = new Dictionary <byte[] /*IndexId*/, byte[] /*metadata*/>(byteArrayEqualityComparer);
            this.totalCount             = 0;
            this.sortDescriptor         = null;
            this.cacheDataReferenceType = CacheDataReferenceTypes.CacheData;
        }
Esempio n. 5
0
 public PagedIndexQueryResult(
     List <TItem> resultList,
     Dictionary <byte[] /*IndexId*/, byte[] /*metadata*/> resultMetadata,
     int totalCount,
     string sortDescriptor,
     CacheDataReferenceTypes cacheDataReferenceType)
 {
     this.resultList             = resultList;
     this.resultMetadata         = resultMetadata;
     this.totalCount             = totalCount;
     this.sortDescriptor         = sortDescriptor;
     this.cacheDataReferenceType = cacheDataReferenceType;
 }
 public VirtualContainsIndexQuery(
     CacheDataReferenceTypes cacheDataReferenceType,
     byte[] indexId,
     byte[] dataId,
     byte[] cacheType,
     bool returnAllSortFields,
     string preferredIndexName,
     bool metadataRequested,
     string cacheTypeName)
     : base(cacheDataReferenceType, indexId, dataId, cacheType, returnAllSortFields, preferredIndexName, metadataRequested)
 {
     this.cacheTypeName = cacheTypeName;
 }
		public VirtualContainsIndexQuery(
			CacheDataReferenceTypes cacheDataReferenceType,
			byte[] indexId,
			byte[] dataId,
			byte[] cacheType,
			bool returnAllSortFields,
			string preferredIndexName,
			bool metadataRequested,
			string cacheTypeName)
			: base(cacheDataReferenceType, indexId, dataId, cacheType, returnAllSortFields, preferredIndexName, metadataRequested)
		{
			this.cacheTypeName = cacheTypeName;
		}
Esempio n. 8
0
        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 PagedIndexQuery(int pageSize, int pageNum, byte[] minValue, byte[] maxValue, List <byte[]> indexIdList, List <byte[]> cacheTypeList, bool cacheTypeListIsInclusionList, bool metadataRequested, bool returnAllSortFields, string preferredIndexName, CacheDataReferenceTypes cacheDataReferenceType)
 {
     this.pageSize = pageSize;
     this.pageNum  = pageNum;
     this.preferredIndexMinValue       = minValue;
     this.preferredIndexMaxValue       = maxValue;
     this.indexIdList                  = indexIdList;
     this.cacheTypeList                = cacheTypeList;
     this.cacheTypeListIsInclusionList = cacheTypeListIsInclusionList;
     this.metadataRequested            = metadataRequested;
     this.preferredIndexName           = preferredIndexName;
     this.cacheDataReferenceType       = cacheDataReferenceType;
     this.returnAllSortFields          = returnAllSortFields;
 }
Esempio n. 10
0
 public ContainsIndexQuery(
     CacheDataReferenceTypes cacheDataReferenceType,
     byte[] indexId,
     byte[] dataId,
     byte[] cacheType,
     bool returnAllSortFields,
     string preferredIndexName,
     bool metadataRequested)
 {
     this.cacheDataReferenceType = cacheDataReferenceType;
     this.indexId             = indexId;
     this.id                  = dataId;
     this.cacheType           = cacheType;
     this.returnAllSortFields = returnAllSortFields;
     this.preferredIndexName  = preferredIndexName;
     this.metadataRequested   = metadataRequested;
 }
        public void Deserialize(MySpace.Common.IO.IPrimitiveReader reader)
        {
            cacheDataReferenceType = (CacheDataReferenceTypes)reader.ReadByte();
            pageSize = reader.ReadInt32();
            pageNum  = reader.ReadInt32();

            ushort valueCount = reader.ReadUInt16();

            if (valueCount > 0)
            {
                preferredIndexMinValue = reader.ReadBytes(valueCount);
            }

            valueCount = reader.ReadUInt16();
            if (valueCount > 0)
            {
                preferredIndexMaxValue = reader.ReadBytes(valueCount);
            }

            ushort count = reader.ReadUInt16();

            if (count > 0)
            {
                ushort indexIdLength = reader.ReadUInt16();
                for (int i = 0; i < count; i++)
                {
                    indexIdList.Add(reader.ReadBytes(indexIdLength));
                }
            }

            count = reader.ReadUInt16();
            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    cacheTypeList.Add(reader.ReadBytes(reader.ReadUInt16()));
                }
            }

            cacheTypeListIsInclusionList = reader.ReadBoolean();
            metadataRequested            = reader.ReadBoolean();
            returnAllSortFields          = reader.ReadBoolean();
            preferredIndexName           = reader.ReadString();
        }
		public ContainsIndexQuery()
		{
			this.cacheDataReferenceType = CacheDataReferenceTypes.CacheData;
			this.indexId = null;
			this.id = null;
			this.cacheType = null;
			this.preferredIndexName = null;
			this.returnAllSortFields = false;
			this.metadataRequested = false;
		}
		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 PagedIndexQuery(CacheDataReferenceTypes cacheDataReferenceType)
 {
     Init();
     this.cacheDataReferenceType = cacheDataReferenceType;
 }
Esempio n. 15
0
 public VirtualPagedIndexQuery(CacheDataReferenceTypes cacheDataReferenceType) : base(cacheDataReferenceType)
 {
     this.cacheTypeName = null;
 }
Esempio n. 16
0
 public VirtualPagedIndexQuery(int pageSize, int pageNum, byte[] minValue, byte[] maxValue, List <byte[]> indexIdList, List <byte[]> cacheTypeList, bool cacheTypeListIsInclusionList, bool metadataRequested, bool returnAllSortFields, string preferredIndexName, CacheDataReferenceTypes cacheDataReferenceType, string cacheTypeName)
     : base(pageSize, pageNum, minValue, maxValue, indexIdList, cacheTypeList, cacheTypeListIsInclusionList, metadataRequested, returnAllSortFields, preferredIndexName, cacheDataReferenceType)
 {
     this.cacheTypeName = cacheTypeName;
 }
		public ContainsIndexQuery(
			CacheDataReferenceTypes cacheDataReferenceType,
			byte[] indexId, 
			byte[] dataId, 
			byte[] cacheType, 
			bool returnAllSortFields, 
			string preferredIndexName, 
			bool metadataRequested)
		{
			this.cacheDataReferenceType = cacheDataReferenceType;
			this.indexId = indexId;
			this.id = dataId;
			this.cacheType = cacheType;
			this.returnAllSortFields = returnAllSortFields;
			this.preferredIndexName = preferredIndexName;
			this.metadataRequested = metadataRequested;
		}