Last active
June 12, 2018 17:02
-
-
Save ernopp/c23db278bdbce5d37a5e72dd2d3f0335 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary>Snippet for ListDeploymentsAsync</summary> | |
public async Task ListDeploymentsAsync_RequestObject() | |
{ | |
// Snippet: ListDeploymentsAsync(ListDeploymentsRequest,CallSettings) | |
// Create client | |
DeploymentServiceClient deploymentServiceClient = await DeploymentServiceClient.CreateAsync(); | |
// Initialize request argument(s) | |
ListDeploymentsRequest request = new ListDeploymentsRequest | |
{ | |
ProjectName = "foobar", | |
}; | |
// Make the request | |
PagedAsyncEnumerable<ListDeploymentsResponse, Deployment> response = | |
deploymentServiceClient.ListDeploymentsAsync(request); | |
// Iterate over all response items, lazily performing RPCs as required | |
await response.ForEachAsync((Deployment item) => | |
{ | |
// Do something with each item | |
Console.WriteLine(item); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment