Class GbpAccountsServiceClient
GbpAccountsService client wrapper, for convenient use.
Namespace: Google.Shopping.Merchant.Accounts.V1
Assembly: Google.Shopping.Merchant.Accounts.V1.dll
Syntax
public abstract class GbpAccountsServiceClient
Remarks
The service facilitates the management of a merchant's Google Business Profile (GBP) account settings. This API defines the following resource model:
- [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount]
Properties
DefaultEndpoint
The default endpoint for the GbpAccountsService service, which is a host of "merchantapi.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
Type | Description |
---|---|
string |
DefaultScopes
The default GbpAccountsService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
Remarks
The default GbpAccountsService scopes are:
- https://www.googleapis.com/auth/content
GrpcClient
The underlying gRPC GbpAccountsService client
Declaration
public virtual GbpAccountsService.GbpAccountsServiceClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
GbpAccountsService.GbpAccountsServiceClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type | Description |
---|---|
ServiceMetadata |
Methods
Create()
Synchronously creates a GbpAccountsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GbpAccountsServiceClientBuilder .
Declaration
public static GbpAccountsServiceClient Create()
Returns
Type | Description |
---|---|
GbpAccountsServiceClient | The created GbpAccountsServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a GbpAccountsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GbpAccountsServiceClientBuilder .
Declaration
public static Task<GbpAccountsServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
Task<GbpAccountsServiceClient> | The task representing the created GbpAccountsServiceClient. |
LinkGbpAccount(AccountName, CallSettings)
Link the specified merchant to a GBP account for all countries.
To run this method, you must have admin access to the Merchant Center
account. If you don't have admin access, the request fails with the error
message User is not an administrator of account {ACCOUNT_ID}
.
Declaration
public virtual LinkGbpAccountResponse LinkGbpAccount(AccountName parent, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The name of the parent resource to which the GBP account is
linked. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
LinkGbpAccountResponse | The RPC response. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = GbpAccountsServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
LinkGbpAccountResponse response = gbpAccountsServiceClient.LinkGbpAccount(parent);
LinkGbpAccount(LinkGbpAccountRequest, CallSettings)
Link the specified merchant to a GBP account for all countries.
To run this method, you must have admin access to the Merchant Center
account. If you don't have admin access, the request fails with the error
message User is not an administrator of account {ACCOUNT_ID}
.
Declaration
public virtual LinkGbpAccountResponse LinkGbpAccount(LinkGbpAccountRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
LinkGbpAccountRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
LinkGbpAccountResponse | The RPC response. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = GbpAccountsServiceClient.Create();
// Initialize request argument(s)
LinkGbpAccountRequest request = new LinkGbpAccountRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
GbpEmail = "",
};
// Make the request
LinkGbpAccountResponse response = gbpAccountsServiceClient.LinkGbpAccount(request);
LinkGbpAccount(string, CallSettings)
Link the specified merchant to a GBP account for all countries.
To run this method, you must have admin access to the Merchant Center
account. If you don't have admin access, the request fails with the error
message User is not an administrator of account {ACCOUNT_ID}
.
Declaration
public virtual LinkGbpAccountResponse LinkGbpAccount(string parent, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the parent resource to which the GBP account is
linked. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
LinkGbpAccountResponse | The RPC response. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = GbpAccountsServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
LinkGbpAccountResponse response = gbpAccountsServiceClient.LinkGbpAccount(parent);
LinkGbpAccountAsync(AccountName, CallSettings)
Link the specified merchant to a GBP account for all countries.
To run this method, you must have admin access to the Merchant Center
account. If you don't have admin access, the request fails with the error
message User is not an administrator of account {ACCOUNT_ID}
.
Declaration
public virtual Task<LinkGbpAccountResponse> LinkGbpAccountAsync(AccountName parent, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The name of the parent resource to which the GBP account is
linked. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<LinkGbpAccountResponse> | A Task containing the RPC response. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = await GbpAccountsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
LinkGbpAccountResponse response = await gbpAccountsServiceClient.LinkGbpAccountAsync(parent);
LinkGbpAccountAsync(AccountName, CancellationToken)
Link the specified merchant to a GBP account for all countries.
To run this method, you must have admin access to the Merchant Center
account. If you don't have admin access, the request fails with the error
message User is not an administrator of account {ACCOUNT_ID}
.
Declaration
public virtual Task<LinkGbpAccountResponse> LinkGbpAccountAsync(AccountName parent, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The name of the parent resource to which the GBP account is
linked. Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<LinkGbpAccountResponse> | A Task containing the RPC response. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = await GbpAccountsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
LinkGbpAccountResponse response = await gbpAccountsServiceClient.LinkGbpAccountAsync(parent);
LinkGbpAccountAsync(LinkGbpAccountRequest, CallSettings)
Link the specified merchant to a GBP account for all countries.
To run this method, you must have admin access to the Merchant Center
account. If you don't have admin access, the request fails with the error
message User is not an administrator of account {ACCOUNT_ID}
.
Declaration
public virtual Task<LinkGbpAccountResponse> LinkGbpAccountAsync(LinkGbpAccountRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
LinkGbpAccountRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<LinkGbpAccountResponse> | A Task containing the RPC response. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = await GbpAccountsServiceClient.CreateAsync();
// Initialize request argument(s)
LinkGbpAccountRequest request = new LinkGbpAccountRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
GbpEmail = "",
};
// Make the request
LinkGbpAccountResponse response = await gbpAccountsServiceClient.LinkGbpAccountAsync(request);
LinkGbpAccountAsync(LinkGbpAccountRequest, CancellationToken)
Link the specified merchant to a GBP account for all countries.
To run this method, you must have admin access to the Merchant Center
account. If you don't have admin access, the request fails with the error
message User is not an administrator of account {ACCOUNT_ID}
.
Declaration
public virtual Task<LinkGbpAccountResponse> LinkGbpAccountAsync(LinkGbpAccountRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
LinkGbpAccountRequest | request | The request object containing all of the parameters for the API call. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<LinkGbpAccountResponse> | A Task containing the RPC response. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = await GbpAccountsServiceClient.CreateAsync();
// Initialize request argument(s)
LinkGbpAccountRequest request = new LinkGbpAccountRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
GbpEmail = "",
};
// Make the request
LinkGbpAccountResponse response = await gbpAccountsServiceClient.LinkGbpAccountAsync(request);
LinkGbpAccountAsync(string, CallSettings)
Link the specified merchant to a GBP account for all countries.
To run this method, you must have admin access to the Merchant Center
account. If you don't have admin access, the request fails with the error
message User is not an administrator of account {ACCOUNT_ID}
.
Declaration
public virtual Task<LinkGbpAccountResponse> LinkGbpAccountAsync(string parent, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the parent resource to which the GBP account is
linked. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<LinkGbpAccountResponse> | A Task containing the RPC response. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = await GbpAccountsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
LinkGbpAccountResponse response = await gbpAccountsServiceClient.LinkGbpAccountAsync(parent);
LinkGbpAccountAsync(string, CancellationToken)
Link the specified merchant to a GBP account for all countries.
To run this method, you must have admin access to the Merchant Center
account. If you don't have admin access, the request fails with the error
message User is not an administrator of account {ACCOUNT_ID}
.
Declaration
public virtual Task<LinkGbpAccountResponse> LinkGbpAccountAsync(string parent, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the parent resource to which the GBP account is
linked. Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<LinkGbpAccountResponse> | A Task containing the RPC response. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = await GbpAccountsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
LinkGbpAccountResponse response = await gbpAccountsServiceClient.LinkGbpAccountAsync(parent);
ListGbpAccounts(AccountName, string, int?, CallSettings)
List the GBP accounts for a given merchant.
Declaration
public virtual PagedEnumerable<ListGbpAccountsResponse, GbpAccount> ListGbpAccounts(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The name of the parent resource under which the GBP accounts are
listed. Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListGbpAccountsResponse, GbpAccount> | A pageable sequence of GbpAccount resources. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = GbpAccountsServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedEnumerable<ListGbpAccountsResponse, GbpAccount> response = gbpAccountsServiceClient.ListGbpAccounts(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (GbpAccount item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListGbpAccountsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (GbpAccount item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<GbpAccount> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (GbpAccount item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListGbpAccounts(ListGbpAccountsRequest, CallSettings)
List the GBP accounts for a given merchant.
Declaration
public virtual PagedEnumerable<ListGbpAccountsResponse, GbpAccount> ListGbpAccounts(ListGbpAccountsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListGbpAccountsRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListGbpAccountsResponse, GbpAccount> | A pageable sequence of GbpAccount resources. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = GbpAccountsServiceClient.Create();
// Initialize request argument(s)
ListGbpAccountsRequest request = new ListGbpAccountsRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
PagedEnumerable<ListGbpAccountsResponse, GbpAccount> response = gbpAccountsServiceClient.ListGbpAccounts(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (GbpAccount item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListGbpAccountsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (GbpAccount item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<GbpAccount> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (GbpAccount item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListGbpAccounts(string, string, int?, CallSettings)
List the GBP accounts for a given merchant.
Declaration
public virtual PagedEnumerable<ListGbpAccountsResponse, GbpAccount> ListGbpAccounts(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the parent resource under which the GBP accounts are
listed. Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedEnumerable<ListGbpAccountsResponse, GbpAccount> | A pageable sequence of GbpAccount resources. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = GbpAccountsServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedEnumerable<ListGbpAccountsResponse, GbpAccount> response = gbpAccountsServiceClient.ListGbpAccounts(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (GbpAccount item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListGbpAccountsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (GbpAccount item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<GbpAccount> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (GbpAccount item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListGbpAccountsAsync(AccountName, string, int?, CallSettings)
List the GBP accounts for a given merchant.
Declaration
public virtual PagedAsyncEnumerable<ListGbpAccountsResponse, GbpAccount> ListGbpAccountsAsync(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The name of the parent resource under which the GBP accounts are
listed. Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListGbpAccountsResponse, GbpAccount> | A pageable asynchronous sequence of GbpAccount resources. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = await GbpAccountsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListGbpAccountsResponse, GbpAccount> response = gbpAccountsServiceClient.ListGbpAccountsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((GbpAccount item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListGbpAccountsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (GbpAccount item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<GbpAccount> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (GbpAccount item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListGbpAccountsAsync(ListGbpAccountsRequest, CallSettings)
List the GBP accounts for a given merchant.
Declaration
public virtual PagedAsyncEnumerable<ListGbpAccountsResponse, GbpAccount> ListGbpAccountsAsync(ListGbpAccountsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListGbpAccountsRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListGbpAccountsResponse, GbpAccount> | A pageable asynchronous sequence of GbpAccount resources. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = await GbpAccountsServiceClient.CreateAsync();
// Initialize request argument(s)
ListGbpAccountsRequest request = new ListGbpAccountsRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
PagedAsyncEnumerable<ListGbpAccountsResponse, GbpAccount> response = gbpAccountsServiceClient.ListGbpAccountsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((GbpAccount item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListGbpAccountsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (GbpAccount item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<GbpAccount> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (GbpAccount item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListGbpAccountsAsync(string, string, int?, CallSettings)
List the GBP accounts for a given merchant.
Declaration
public virtual PagedAsyncEnumerable<ListGbpAccountsResponse, GbpAccount> ListGbpAccountsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the parent resource under which the GBP accounts are
listed. Format: |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
PagedAsyncEnumerable<ListGbpAccountsResponse, GbpAccount> | A pageable asynchronous sequence of GbpAccount resources. |
Sample code
// Create client
GbpAccountsServiceClient gbpAccountsServiceClient = await GbpAccountsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListGbpAccountsResponse, GbpAccount> response = gbpAccountsServiceClient.ListGbpAccountsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((GbpAccount item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListGbpAccountsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (GbpAccount item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<GbpAccount> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (GbpAccount item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous shutdown operation. |
Remarks
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.