public Task <IStorageBlobResultSegment> ListBlobsSegmentedAsync(string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, int?maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) { if (options != null) { throw new NotImplementedException(); } if (operationContext != null) { throw new NotImplementedException(); } Func <string, IStorageBlobContainer> containerFactory = (n) => new FakeStorageBlobContainer(_store, n, this); IStorageBlobResultSegment segment = _store.ListBlobsSegmented(containerFactory, prefix, useFlatBlobListing, blobListingDetails, maxResults, currentToken); return(Task.FromResult(segment)); }
public virtual Task <IStorageBlobResultSegment> ListBlobsSegmentedAsync(string prefix, bool useFlatBlobListing, BlobListingDetails blobListingDetails, int?maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) { if (options != null) { throw new NotImplementedException(); } if (operationContext != null) { throw new NotImplementedException(); } string fullPrefix; if (!String.IsNullOrEmpty(prefix)) { fullPrefix = _containerName + "/" + prefix; } else { fullPrefix = _containerName; } Func <string, IStorageBlobContainer> containerFactory = (name) => { if (name != _containerName) { throw new InvalidOperationException(); } return(this); }; IStorageBlobResultSegment segment = _store.ListBlobsSegmented(containerFactory, fullPrefix, useFlatBlobListing, blobListingDetails, maxResults, currentToken); return(Task.FromResult(segment)); }