Beispiel #1
0
        internal ListBranchesResponse ListBranches(ListBranchesRequest request)
        {
            var marshaller   = new ListBranchesRequestMarshaller();
            var unmarshaller = ListBranchesResponseUnmarshaller.Instance;

            return(Invoke <ListBranchesRequest, ListBranchesResponse>(request, marshaller, unmarshaller));
        }
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonCodeCommitConfig config = new AmazonCodeCommitConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonCodeCommitClient client = new AmazonCodeCommitClient(creds, config);

            ListBranchesResponse resp = new ListBranchesResponse();

            do
            {
                ListBranchesRequest req = new ListBranchesRequest
                {
                    NextToken = resp.NextToken
                };

                resp = client.ListBranches(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.Branches)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
Beispiel #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListBranches operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListBranches operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task <ListBranchesResponse> ListBranchesAsync(ListBranchesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new ListBranchesRequestMarshaller();
            var unmarshaller = ListBranchesResponseUnmarshaller.Instance;

            return(InvokeAsync <ListBranchesRequest, ListBranchesResponse>(request, marshaller,
                                                                           unmarshaller, cancellationToken));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the ListBranches operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListBranches operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ListBranches">REST API Reference for ListBranches Operation</seealso>
        public virtual Task <ListBranchesResponse> ListBranchesAsync(ListBranchesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListBranchesRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListBranchesResponseUnmarshaller.Instance;

            return(InvokeAsync <ListBranchesResponse>(request, options, cancellationToken));
        }
        internal virtual ListBranchesResponse ListBranches(ListBranchesRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListBranchesRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListBranchesResponseUnmarshaller.Instance;

            return(Invoke <ListBranchesResponse>(request, options));
        }