• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ContainerListingDetails类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ContainerListingDetails的典型用法代码示例。如果您正苦于以下问题:C# ContainerListingDetails类的具体用法?C# ContainerListingDetails怎么用?C# ContainerListingDetails使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ContainerListingDetails类属于命名空间,在下文中一共展示了ContainerListingDetails类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ListContainersSegmented

 private Task<ContainerResultSegment> ListContainersSegmented(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken continuationToken, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken = default(CancellationToken))
 {
     return AsyncTaskUtil.RunAsyncCancellable<ContainerResultSegment>(
         _inner.BeginListContainersSegmented(prefix, detailsIncluded, maxResults, continuationToken, options, operationContext, null, null),
         _inner.EndListContainersSegmented,
         cancellationToken);
 }
开发者ID:Porges,项目名称:azure-storage-async,代码行数:7,代码来源:AsyncCloudBlobClient.cs


示例2: ListContainersAsync

        public static async Task<List<CloudBlobContainer>> ListContainersAsync(this CloudBlobClient client, ContainerListingDetails details)
        {
            BlobContinuationToken continuationToken = null;
            BlobRequestOptions blobRequestOptions = new BlobRequestOptions();
            OperationContext operationContext = new OperationContext();

            List<CloudBlobContainer> results = new List<CloudBlobContainer>();
            do
            {
                var response = await client.ListContainersSegmentedAsync(string.Empty, details, null, continuationToken, blobRequestOptions, operationContext);
                continuationToken = response.ContinuationToken;
                results.AddRange(response.Results);
            }
            while (continuationToken != null);
            return results;
        }
开发者ID:rolandkru,项目名称:bbvAcademyAzure,代码行数:16,代码来源:StorageExtensions.cs


示例3: ListContainers

        public IObservable<AsyncCloudBlobContainer> ListContainers(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobRequestOptions options, OperationContext operationContext)
        {
            return Observable.Create<AsyncCloudBlobContainer>(
            async (observer, ct) =>
            {
                var containerToken = new BlobContinuationToken();
                while (containerToken != null)
                {
                    var results = await ListContainersSegmented(prefix, detailsIncluded, maxResults, containerToken, options, operationContext, ct);
                    foreach (var result in results.Results)
                    {
                        observer.OnNext(new AsyncCloudBlobContainer(result));
                    }

                    containerToken = results.ContinuationToken;
                }
            });
        }
开发者ID:Porges,项目名称:azure-storage-async,代码行数:18,代码来源:AsyncCloudBlobClient.cs


示例4: ListContainers

        /// <summary>
        /// Get a list of cloudblobcontainer in azure
        /// </summary>
        /// <param name="prefix">Container prefix</param>
        /// <param name="detailsIncluded">Container listing details</param>
        /// <param name="options">Blob request option</param>
        /// <param name="operationContext">Operation context</param>
        /// <returns>An enumerable collection of cloudblobcontainer</returns>
        public IEnumerable<CloudBlobContainer> ListContainers(string prefix, ContainerListingDetails detailsIncluded, BlobRequestOptions options = null, OperationContext operationContext = null)
        {
            if (string.IsNullOrEmpty(prefix))
            {
                return ContainerList;
            }
            else
            {
                List<CloudBlobContainer> prefixContainerList = new List<CloudBlobContainer>();

                foreach (CloudBlobContainer container in ContainerList)
                {
                    if (container.Name.StartsWith(prefix))
                    {
                        prefixContainerList.Add(container);
                    }
                }

                return prefixContainerList;
            }
        }
开发者ID:nakidsworks,项目名称:azure-sdk-tools,代码行数:29,代码来源:MockStorageBlobManagement.cs


示例5: List

 /// <summary>
 /// Constructs a web request to return a listing of all containers in this storage account.
 /// </summary>
 /// <param name="uri">A <see cref="System.Uri"/> specifying the Blob service endpoint.</param>
 /// <param name="timeout">An integer specifying the server timeout interval.</param>
 /// <param name="listingContext">A <see cref="ListingContext"/> object.</param>
 /// <param name="detailsIncluded">A <see cref="ContainerListingDetails"/> enumeration value that indicates whether to return container metadata with the listing.</param>
 /// <param name="operationContext">An <see cref="OperationContext"/> object that represents the context for the current operation.</param>
 /// <returns>A web request for the specified operation.</returns>
 public static HttpWebRequest List(Uri uri, int? timeout, ListingContext listingContext, ContainerListingDetails detailsIncluded, OperationContext operationContext)
 {
     return ContainerHttpWebRequestFactory.List(uri, timeout, listingContext, detailsIncluded, true /* useVersionHeader */, operationContext);
 }
开发者ID:benaadams,项目名称:azure-storage-net,代码行数:13,代码来源:ContainerHttpWebRequestFactory.cs


示例6: ListContainersImpl

        /// <summary>
        /// Core implementation for the ListContainers method.
        /// </summary>
        /// <param name="prefix">The container prefix.</param>
        /// <param name="detailsIncluded">The details included.</param>
        /// <param name="currentToken">The continuation token.</param>
        /// <param name="maxResults">A non-negative integer value that indicates the maximum number of results to be returned 
        /// in the result segment, up to the per-operation limit of 5000. If this value is null, the maximum possible number of results will be returned, up to 5000.</param>
        /// <param name="options">A <see cref="BlobRequestOptions"/> object that specifies any additional options for the request.</param>
        /// <returns>A <see cref="ResultSegment{T}"/> that lists the containers.</returns>
        private RESTCommand<ResultSegment<CloudBlobContainer>> ListContainersImpl(string prefix, ContainerListingDetails detailsIncluded, BlobContinuationToken currentToken, int? maxResults, BlobRequestOptions options)
        {
            ListingContext listingContext = new ListingContext(prefix, maxResults)
            {
                Marker = currentToken != null ? currentToken.NextMarker : null
            };

            RESTCommand<ResultSegment<CloudBlobContainer>> getCmd = new RESTCommand<ResultSegment<CloudBlobContainer>>(this.Credentials, this.BaseUri);

            getCmd.ApplyRequestOptions(options);
            getCmd.RetrieveResponseStream = true;
            getCmd.BuildRequestDelegate = (uri, builder, serverTimeout, ctx) => ContainerHttpWebRequestFactory.List(uri, serverTimeout, listingContext, detailsIncluded, ctx);
            getCmd.SignRequest = this.AuthenticationHandler.SignRequest;
            getCmd.PreProcessResponse = (cmd, resp, ex, ctx) => HttpResponseParsers.ProcessExpectedStatusCodeNoException(HttpStatusCode.OK, resp, null /* retVal */, cmd, ex, ctx);
            getCmd.PostProcessResponse = (cmd, resp, ex, ctx) =>
            {
                ListContainersResponse listContainersResponse = new ListContainersResponse(cmd.ResponseStream);
                List<CloudBlobContainer> containersList = new List<CloudBlobContainer>(
                    listContainersResponse.Containers.Select(item => new CloudBlobContainer(item.Properties, item.Metadata, item.Name, this)));
                BlobContinuationToken continuationToken = null;
                if (listContainersResponse.NextMarker != null)
                {
                    continuationToken = new BlobContinuationToken()
                    {
                        NextMarker = listContainersResponse.NextMarker,
                    };
                }

                return new ResultSegment<CloudBlobContainer>(containersList)
                {
                    ContinuationToken = continuationToken,
                };
            };

            return getCmd;
        }
开发者ID:jdkillian,项目名称:azure-sdk-for-net,代码行数:46,代码来源:CloudBlobClient.cs


示例7: ListContainersSegmentedCore

 /// <summary>
 /// Returns a result segment containing a collection of containers
 /// whose names begin with the specified prefix.
 /// </summary>
 /// <param name="prefix">The container name prefix.</param>
 /// <param name="detailsIncluded">A value that indicates whether to return container metadata with the listing.</param>
 /// <param name="maxResults">A non-negative integer value that indicates the maximum number of results to be returned 
 /// in the result segment, up to the per-operation limit of 5000. If this value is null, the maximum possible number of results will be returned, up to 5000.</param>         
 /// <param name="continuationToken">A continuation token returned by a previous listing operation.</param>
 /// <param name="options">A <see cref="BlobRequestOptions"/> object that specifies execution options, such as retry policy and timeout settings, for the operation.</param>
 /// <param name="operationContext">An <see cref="OperationContext"/> object that represents the context for the current operation.</param>
 /// <returns>A result segment of containers.</returns>
 private ResultSegment<CloudBlobContainer> ListContainersSegmentedCore(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken continuationToken, BlobRequestOptions options, OperationContext operationContext)
 {
     return Executor.ExecuteSync(
         this.ListContainersImpl(prefix, detailsIncluded, continuationToken, maxResults, options),
         options.RetryPolicy,
         operationContext);
 }
开发者ID:jdkillian,项目名称:azure-sdk-for-net,代码行数:19,代码来源:CloudBlobClient.cs


示例8: List

        /// <summary>
        /// Constructs a web request to return a listing of all containers in this storage account.
        /// </summary>
        /// <param name="uri">The absolute URI for the account.</param>
        /// <param name="timeout">The server timeout interval.</param>
        /// <param name="listingContext">A set of parameters for the listing operation.</param>
        /// <param name="detailsIncluded">Additional details to return with the listing.</param>
        /// <returns>A web request for the specified operation.</returns>
        public static HttpRequestMessage List(Uri uri, int? timeout, ListingContext listingContext, ContainerListingDetails detailsIncluded, HttpContent content, OperationContext operationContext)
        {
            UriQueryBuilder builder = new UriQueryBuilder();
            builder.Add(Constants.QueryConstants.Component, "list");

            if (listingContext != null)
            {
                if (listingContext.Prefix != null)
                {
                    builder.Add("prefix", listingContext.Prefix);
                }

                if (listingContext.Marker != null)
                {
                    builder.Add("marker", listingContext.Marker);
                }

                if (listingContext.MaxResults != null)
                {
                    builder.Add("maxresults", listingContext.MaxResults.ToString());
                }
            }

            if ((detailsIncluded & ContainerListingDetails.Metadata) != 0)
            {
                builder.Add("include", "metadata");
            }

            HttpRequestMessage request = HttpRequestMessageFactory.CreateRequestMessage(HttpMethod.Get, uri, timeout, builder, content, operationContext);
            return request;
        }
开发者ID:huoxudong125,项目名称:azure-sdk-for-net,代码行数:39,代码来源:ContainerHttpRequestMessageFactory.cs


示例9: ListContainersSegmentedAsync

        public Task<ContainerResultSegment> ListContainersSegmentedAsync(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
        {
            return Task.Run(async () =>
            {
                BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this);
                ResultSegment<CloudBlobContainer> resultSegment = await Executor.ExecuteAsync(
                    this.ListContainersImpl(prefix, detailsIncluded, currentToken, maxResults, modifiedOptions),
                    modifiedOptions.RetryPolicy,
                    operationContext,
                    cancellationToken);

                return new ContainerResultSegment(resultSegment.Results, (BlobContinuationToken)resultSegment.ContinuationToken);
            }, cancellationToken);
        }
开发者ID:renlesterdg,项目名称:azure-storage-net,代码行数:14,代码来源:CloudBlobClient.cs


示例10: ListContainers

 /// <summary>
 /// Get a list of cloudblobcontainer in azure
 /// </summary>
 /// <param name="prefix">Container prefix</param>
 /// <param name="detailsIncluded">Container listing details</param>
 /// <param name="options">Blob request option</param>
 /// <param name="operationContext">Operation context</param>
 /// <returns>An enumerable collection of cloudblobcontainer</returns>
 public IEnumerable<CloudBlobContainer> ListContainers(string prefix, ContainerListingDetails detailsIncluded, BlobRequestOptions options, OperationContext operationContext)
 {
     return blobClient.ListContainers(prefix, detailsIncluded, options, operationContext);
 }
开发者ID:NordPool,项目名称:azure-sdk-tools,代码行数:12,代码来源:StorageBlobManagement.cs


示例11: ListContainersAsync

 /// <summary>
 ///     Returns an enumerable collection of the blobs in the container that are retrieved asynchronously.
 /// </summary>
 /// <param name="blobClient">Cloud blob client.</param>
 /// <param name="prefix">The blob name prefix.</param>
 /// <param name="detailsIncluded">A value that indicates whether to return container metadata with the listing.</param>
 /// <param name="maxResults">
 ///     A non-negative integer value that indicates the maximum number of results to be returned
 ///     in the result segment, up to the per-operation limit of 5000. If this value is null, the maximum possible number of results will be returned, up to 5000.
 /// </param>
 /// <param name="cancellationToken">Cancellation token.</param>
 /// <returns>
 ///     An enumerable collection of objects that implement <see cref="T:Microsoft.WindowsAzure.Storage.Blob.IListBlobItem" /> that are retrieved.
 /// </returns>
 public static Task<List<CloudBlobContainer>> ListContainersAsync(
     this CloudBlobClient blobClient,
     string prefix,
     ContainerListingDetails detailsIncluded,
     int? maxResults,
     CancellationToken cancellationToken = default (CancellationToken))
 {
     return ListContainersImplAsync(blobClient, new List<CloudBlobContainer>(), prefix, detailsIncluded, maxResults, null, cancellationToken);
 }
开发者ID:jorik041,项目名称:WindowsAzure,代码行数:23,代码来源:CloudBlobClientExtensions.cs


示例12: ListContainersImplAsync

        /// <summary>
        ///     Returns an enumerable collection of the blobs in the container that are retrieved asynchronously.
        /// </summary>
        /// <param name="blobClient">Cloud blob client.</param>
        /// <param name="cloudContainers">List of cloud containers.</param>
        /// <param name="prefix">The blob name prefix.</param>
        /// <param name="detailsIncluded">A value that indicates whether to return container metadata with the listing.</param>
        /// <param name="maxResults">
        ///     A non-negative integer value that indicates the maximum number of results to be returned
        ///     in the result segment, up to the per-operation limit of 5000. If this value is null, the maximum possible number of results will be returned, up to 5000.
        /// </param>
        /// <param name="continuationToken">Continuation token.</param>
        /// <param name="cancellationToken">Cancellation token.</param>
        /// <returns>
        ///     An enumerable collection of objects that implement <see cref="T:Microsoft.WindowsAzure.Storage.Blob.IListBlobItem" /> that are retrieved.
        /// </returns>
        private static Task<List<CloudBlobContainer>> ListContainersImplAsync(
            this CloudBlobClient blobClient,
            List<CloudBlobContainer> cloudContainers,
            string prefix,
            ContainerListingDetails detailsIncluded,
            int? maxResults,
            BlobContinuationToken continuationToken,
            CancellationToken cancellationToken = default (CancellationToken))
        {
            return blobClient
                .ListContainersSegmentedAsync(prefix, detailsIncluded, maxResults, continuationToken, cancellationToken)
                .Then(result =>
                    {
                        cancellationToken.ThrowIfCancellationRequested();

                        cloudContainers.AddRange(result.Results);

                        // Checks whether maxresults entities has been received
                        if (maxResults.HasValue && cloudContainers.Count >= maxResults.Value)
                        {
                            return TaskHelpers.FromResult(cloudContainers.Take(maxResults.Value).ToList());
                        }

                        // Checks whether enumeration has been completed
                        if (result.ContinuationToken != null)
                        {
                            return ListContainersImplAsync(blobClient, cloudContainers, prefix, detailsIncluded, maxResults, result.ContinuationToken, cancellationToken);
                        }

                        return TaskHelpers.FromResult(cloudContainers);
                    });
        }
开发者ID:jorik041,项目名称:WindowsAzure,代码行数:48,代码来源:CloudBlobClientExtensions.cs


示例13: ListContainersSegmentedAsync

        /// <summary>
        ///     Returns a result segment containing a collection of containers whose names begin with the specified prefix asynchronously.
        /// </summary>
        /// <param name="blobClient">Cloud blob client.</param>
        /// <param name="prefix">The container name prefix.</param>
        /// <param name="detailsIncluded">A value that indicates whether to return container metadata with the listing.</param>
        /// <param name="maxResults">
        ///     A non-negative integer value that indicates the maximum number of results to be returned
        ///     in the result segment, up to the per-operation limit of 5000. If this value is null, the maximum possible number of results will be returned, up to 5000.
        /// </param>
        /// <param name="continuationToken">
        ///     A <see cref="T:Microsoft.WindowsAzure.Storage.Blob.BlobContinuationToken" /> returned by a previous listing operation.
        /// </param>
        /// <param name="cancellationToken">Cancellation token.</param>
        /// <returns>
        ///     A result segment of containers.
        /// </returns>
        public static Task<ContainerResultSegment> ListContainersSegmentedAsync(
            this CloudBlobClient blobClient,
            string prefix,
            ContainerListingDetails detailsIncluded,
            int? maxResults,
            BlobContinuationToken continuationToken,
            CancellationToken cancellationToken = default (CancellationToken))
        {
            ICancellableAsyncResult asyncResult = blobClient.BeginListContainersSegmented(prefix, detailsIncluded, maxResults, continuationToken, null, null, null, null);
            CancellationTokenRegistration registration = cancellationToken.Register(p => asyncResult.Cancel(), null);

            return Task<ContainerResultSegment>.Factory.FromAsync(
                asyncResult,
                result =>
                    {
                        registration.Dispose();
                        return blobClient.EndListContainersSegmented(result);
                    });
        }
开发者ID:jorik041,项目名称:WindowsAzure,代码行数:36,代码来源:CloudBlobClientExtensions.cs


示例14: List

        /// <summary>
        /// Constructs a web request to return a listing of all containers in this storage account.
        /// </summary>
        /// <param name="uri">The absolute URI for the account.</param>
        /// <param name="timeout">The server timeout interval.</param>
        /// <param name="listingContext">A set of parameters for the listing operation.</param>
        /// <param name="detailsIncluded">Additional details to return with the listing.</param>
        /// <returns>A web request for the specified operation.</returns>
        public static HttpWebRequest List(Uri uri, int timeout, ListingContext listingContext, ContainerListingDetails detailsIncluded)
        {
            UriQueryBuilder builder = new UriQueryBuilder();
            builder.Add(Constants.QueryConstants.Component, "list");

            if (listingContext != null)
            {
                if (listingContext.Prefix != null)
                {
                    builder.Add("prefix", listingContext.Prefix);
                }

                if (listingContext.Marker != null)
                {
                    builder.Add("marker", listingContext.Marker);
                }

                if (listingContext.MaxResults != null)
                {
                    builder.Add("maxresults", listingContext.MaxResults.ToString());
                }
            }

            if ((detailsIncluded & ContainerListingDetails.Metadata) != 0)
            {
                builder.Add("include", "metadata");
            }

            HttpWebRequest request = CreateWebRequest(uri, timeout, builder);

            request.Method = "GET";

            return request;
        }
开发者ID:nagyist,项目名称:azure-sdk-for-mono,代码行数:42,代码来源:ContainerRequest.cs


示例15: ListContainersSegmentedAsync

 public Task<ContainerResultSegment> ListContainersSegmentedAsync(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken continuationToken, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
 {
     return AsyncExtensions.TaskFromApm(this.BeginListContainersSegmented, this.EndListContainersSegmented, prefix, detailsIncluded, maxResults, continuationToken, options, operationContext, cancellationToken);
 }
开发者ID:huoxudong125,项目名称:azure-sdk-for-net,代码行数:4,代码来源:CloudBlobClient.cs


示例16: ListContainersSegmented

 /// <summary>
 /// Get a list of cloudblobcontainer in azure
 /// </summary>
 /// <param name="prefix">Container prefix</param>
 /// <param name="detailsIncluded">Container listing details</param>
 /// <param name="options">Blob request option</param>
 /// <param name="operationContext">Operation context</param>
 /// <returns>An enumerable collection of cloudblobcontainer</returns>
 public ContainerResultSegment ListContainersSegmented(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext)
 {
     return blobClient.ListContainersSegmented(prefix, detailsIncluded, maxResults, currentToken, options, operationContext);
 }
开发者ID:NordPool,项目名称:azure-sdk-tools,代码行数:12,代码来源:StorageBlobManagement.cs


示例17: ListContainers

 /// <summary>
 /// Returns an enumerable collection of containers whose names 
 /// begin with the specified prefix and that are retrieved lazily.
 /// </summary>
 /// <param name="prefix">The container name prefix.</param>
 /// <param name="detailsIncluded">A value that indicates whether to return container metadata with the listing.</param>
 /// <returns>An enumerable collection of containers that are retrieved lazily.</returns>
 public IEnumerable<CloudBlobContainer> ListContainers(string prefix, ContainerListingDetails detailsIncluded)
 {
     return CommonUtils.LazyEnumerateSegmented<CloudBlobContainer>(
         (setResult) => this.ListContainersImpl(prefix, detailsIncluded, null, null, setResult),
         this.RetryPolicy);
 }
开发者ID:nickchal,项目名称:pash,代码行数:13,代码来源:CloudBlobClient.cs


示例18: ListContainersSegmented

 /// <summary>
 /// Returns a result segment containing a collection of containers
 /// whose names begin with the specified prefix.
 /// </summary>
 /// <param name="prefix">The container name prefix.</param>
 /// <param name="detailsIncluded">A value that indicates whether to return container metadata with the listing.</param>
 /// <param name="maxResults">A non-negative integer value that indicates the maximum number of results to be returned 
 /// in the result segment, up to the per-operation limit of 5000. If this value is zero, the maximum possible number of results will be returned, up to 5000.</param>         
 /// <param name="continuationToken">A continuation token returned by a previous listing operation.</param> 
 /// <returns>A result segment of containers.</returns>
 public ResultSegment<CloudBlobContainer> ListContainersSegmented(
     string prefix,
     ContainerListingDetails detailsIncluded,
     int maxResults,
     ResultContinuation continuationToken)
 {
     return TaskImplHelper.ExecuteImplWithRetry<ResultSegment<CloudBlobContainer>>(
         (setResult) => this.ListContainersImpl(prefix, detailsIncluded, continuationToken, maxResults, setResult),
         this.RetryPolicy);
 }
开发者ID:nickchal,项目名称:pash,代码行数:20,代码来源:CloudBlobClient.cs


示例19: ListContainersImpl

        /// <summary>
        /// Core implementation for the ListContainers method.
        /// </summary>
        /// <param name="prefix">The container prefix.</param>
        /// <param name="detailsIncluded">The details included.</param>
        /// <param name="currentToken">The continuation token.</param>
        /// <param name="maxResults">A non-negative integer value that indicates the maximum number of results to be returned at a time, up to the 
        /// per-operation limit of 5000. If this value is <c>null</c>, the maximum possible number of results will be returned, up to 5000.</param>         
        /// <param name="options">A <see cref="BlobRequestOptions"/> object that specifies execution options, such as retry policy and timeout settings, for the operation.</param>
        /// <returns>A <see cref="TaskSequence"/> that lists the containers.</returns>
        private RESTCommand<ResultSegment<CloudBlobContainer>> ListContainersImpl(string prefix, ContainerListingDetails detailsIncluded, BlobContinuationToken currentToken, int? maxResults, BlobRequestOptions options)
        {
            ListingContext listingContext = new ListingContext(prefix, maxResults)
            {
                Marker = currentToken != null ? currentToken.NextMarker : null
            };

            RESTCommand<ResultSegment<CloudBlobContainer>> getCmd = new RESTCommand<ResultSegment<CloudBlobContainer>>(this.Credentials, this.StorageUri);

            options.ApplyToStorageCommand(getCmd);
            getCmd.CommandLocationMode = CommonUtility.GetListingLocationMode(currentToken);
            getCmd.RetrieveResponseStream = true;
            getCmd.Handler = this.AuthenticationHandler;
            getCmd.BuildClient = HttpClientFactory.BuildHttpClient;
            getCmd.BuildRequest = (cmd, uri, builder, cnt, serverTimeout, ctx) => ContainerHttpRequestMessageFactory.List(uri, serverTimeout, listingContext, detailsIncluded, cnt, ctx);
            getCmd.PreProcessResponse = (cmd, resp, ex, ctx) => HttpResponseParsers.ProcessExpectedStatusCodeNoException(HttpStatusCode.OK, resp, null /* retVal */, cmd, ex);
            getCmd.PostProcessResponse = (cmd, resp, ctx) =>
            {
                return Task.Factory.StartNew(() =>
                {
                    ListContainersResponse listContainersResponse = new ListContainersResponse(cmd.ResponseStream);
                    List<CloudBlobContainer> containersList = listContainersResponse.Containers.Select(item => new CloudBlobContainer(item.Properties, item.Metadata, item.Name, this)).ToList();
                    BlobContinuationToken continuationToken = null;
                    if (listContainersResponse.NextMarker != null)
                    {
                        continuationToken = new BlobContinuationToken()
                        {
                            NextMarker = listContainersResponse.NextMarker,
                            TargetLocation = cmd.CurrentResult.TargetLocation,
                        };
                    }

                    return new ResultSegment<CloudBlobContainer>(containersList)
                    {
                        ContinuationToken = continuationToken,
                    };
                });
            };

            return getCmd;
        }
开发者ID:renlesterdg,项目名称:azure-storage-net,代码行数:51,代码来源:CloudBlobClient.cs


示例20: BeginListContainersSegmented

 /// <summary>
 /// Begins an asynchronous request to return a result segment containing a collection of containers
 /// whose names begin with the specified prefix.
 /// </summary>
 /// <param name="prefix">The container name prefix.</param>
 /// <param name="detailsIncluded">A value that indicates whether to return container metadata with the listing.</param>
 /// <param name="callback">The callback delegate that will receive notification when the asynchronous operation completes.</param>
 /// <param name="state">A user-defined object that will be passed to the callback delegate.</param>
 /// <returns>An <see cref="IAsyncResult"/> that references the asynchronous operation.</returns>
 public IAsyncResult BeginListContainersSegmented(string prefix, ContainerListingDetails detailsIncluded, AsyncCallback callback, object state)
 {
     return this.BeginListContainersSegmented(prefix, detailsIncluded, 0, null, callback, state);
 }
开发者ID:nickchal,项目名称:pash,代码行数:13,代码来源:CloudBlobClient.cs



注:本文中的ContainerListingDetails类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ContainmentOperator类代码示例发布时间:2022-05-24
下一篇:
C# ContainerContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap