Beispiel #1
0
        public IEnumerable <DataBlob> GetBlob(DataBlobVersion blobVersion, bool queryPrimaryOnly, ref string pageCookie, out bool complete, int pageSize = 10)
        {
            DataBlobSession.ValidateDataBlobVersionCommon(blobVersion, true);
            QueryFilter baseQueryFilter = QueryFilter.AndTogether(new QueryFilter[]
            {
                new ComparisonFilter(ComparisonOperator.Equal, DataBlobCommonSchema.DataTypeIdProperty, blobVersion.DataTypeId),
                new ComparisonFilter(ComparisonOperator.Equal, DataBlobCommonSchema.MajorVersionProperty, blobVersion.Version.Major),
                new ComparisonFilter(ComparisonOperator.Equal, DataBlobCommonSchema.MinorVersionProperty, blobVersion.Version.Minor),
                new ComparisonFilter(ComparisonOperator.Equal, DataBlobCommonSchema.BuildNumberProperty, blobVersion.Version.Build),
                new ComparisonFilter(ComparisonOperator.Equal, DataBlobCommonSchema.RevisionNumberProperty, blobVersion.Version.Revision),
                new ComparisonFilter(ComparisonOperator.Equal, DataBlobCommonSchema.BlobIdProperty, blobVersion.BlobId),
                new ComparisonFilter(ComparisonOperator.Equal, DataBlobCommonSchema.PrimaryOnlyProperty, queryPrimaryOnly)
            });
            QueryFilter            pagingQueryFilter = PagingHelper.GetPagingQueryFilter(baseQueryFilter, pageCookie);
            IEnumerable <DataBlob> result            = this.dataProvider.FindPaged <DataBlob>(pagingQueryFilter, null, false, null, pageSize).Cast <DataBlob>().Cache <DataBlob>();

            pageCookie = PagingHelper.GetProcessedCookie(pagingQueryFilter, out complete);
            return(result);
        }