コード例 #1
0
        public async Task <IReadOnlyList <DataDeliveryReceiptDetails> > BrowseAsync(Keccak?depositId = null, Keccak?dataAssetId = null, Keccak?sessionId = null)
        {
            var receipts = Receipts.AsQueryable();

            if (!(depositId is null))
            {
                receipts = receipts.Where(c => c.DepositId == depositId);
            }

            if (!(dataAssetId is null))
            {
                receipts = receipts.Where(c => c.DataAssetId == dataAssetId);
            }

            if (!(sessionId is null))
            {
                receipts = receipts.Where(c => c.SessionId == sessionId);
            }

            return(await receipts.OrderBy(s => s.Number).ToListAsync());
        }