private async Task <IStorageBlobResultSegment> ListBlobsSegmentedAsyncCore(Task <BlobResultSegment> sdkTask)
        {
            BlobResultSegment sdkSegment = await sdkTask;

            if (sdkSegment == null)
            {
                return(null);
            }

            IEnumerable <IListBlobItem> sdkResults = sdkSegment.Results;

            List <IStorageListBlobItem> results;

            if (sdkResults != null)
            {
                results = new List <IStorageListBlobItem>();

                foreach (IListBlobItem sdkResult in sdkResults)
                {
                    CloudBlobContainer sdkContainer = sdkResult.Container;
                    Debug.Assert(sdkContainer != null);
                    IStorageBlobContainer container = new StorageBlobContainer(this, sdkContainer);
                    IStorageListBlobItem  result    = StorageBlobContainer.ToStorageListBlobItem(container, sdkResult);
                    results.Add(result);
                }
            }
            else
            {
                results = null;
            }

            return(new StorageBlobResultSegment(sdkSegment.ContinuationToken, results));
        }
        private async Task <IStorageBlobResultSegment> ListBlobsSegmentedAsyncCore(Task <BlobResultSegment> sdkTask)
        {
            BlobResultSegment sdkSegment = await sdkTask;

            if (sdkSegment == null)
            {
                return(null);
            }

            IEnumerable <IListBlobItem> sdkResults = sdkSegment.Results;

            List <IStorageListBlobItem> results;

            if (sdkResults != null)
            {
                results = new List <IStorageListBlobItem>();

                foreach (IListBlobItem sdkResult in sdkResults)
                {
                    IStorageListBlobItem result = ToStorageListBlobItem(this, sdkResult);
                    results.Add(result);
                }
            }
            else
            {
                results = null;
            }

            return(new StorageBlobResultSegment(sdkSegment.ContinuationToken, results));
        }