Show / Hide Table of Contents

Class DeviceManufacturerServiceClient

DeviceManufacturerService client wrapper, for convenient use.

Inheritance
object
DeviceManufacturerServiceClient
DeviceManufacturerServiceClientImpl
Inherited Members
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.Ads.AdManager.V1
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public abstract class DeviceManufacturerServiceClient
Remarks

Provides methods for handling DeviceManufacturer objects.

Properties

DefaultEndpoint

The default endpoint for the DeviceManufacturerService service, which is a host of "admanager.googleapis.com" and a port of 443.

Declaration
public static string DefaultEndpoint { get; }
Property Value
Type Description
string

DefaultScopes

The default DeviceManufacturerService scopes.

Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type Description
IReadOnlyList<string>
Remarks

The default DeviceManufacturerService scopes are:

  • https://www.googleapis.com/auth/admanager

GrpcClient

The underlying gRPC DeviceManufacturerService client

Declaration
public virtual DeviceManufacturerService.DeviceManufacturerServiceClient GrpcClient { get; }
Property Value
Type Description
DeviceManufacturerService.DeviceManufacturerServiceClient

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 DeviceManufacturerServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DeviceManufacturerServiceClientBuilder.

Declaration
public static DeviceManufacturerServiceClient Create()
Returns
Type Description
DeviceManufacturerServiceClient

The created DeviceManufacturerServiceClient.

CreateAsync(CancellationToken)

Asynchronously creates a DeviceManufacturerServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DeviceManufacturerServiceClientBuilder.

Declaration
public static Task<DeviceManufacturerServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
Task<DeviceManufacturerServiceClient>

The task representing the created DeviceManufacturerServiceClient.

GetDeviceManufacturer(DeviceManufacturerName, CallSettings)

API to retrieve a DeviceManufacturer object.

Declaration
public virtual DeviceManufacturer GetDeviceManufacturer(DeviceManufacturerName name, CallSettings callSettings = null)
Parameters
Type Name Description
DeviceManufacturerName name

Required. The resource name of the DeviceManufacturer. Format: networks/{network_code}/deviceManufacturers/{device_manufacturer_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DeviceManufacturer

The RPC response.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = DeviceManufacturerServiceClient.Create();
// Initialize request argument(s)
DeviceManufacturerName name = DeviceManufacturerName.FromNetworkCodeDeviceManufacturer("[NETWORK_CODE]", "[DEVICE_MANUFACTURER]");
// Make the request
DeviceManufacturer response = deviceManufacturerServiceClient.GetDeviceManufacturer(name);

GetDeviceManufacturer(GetDeviceManufacturerRequest, CallSettings)

API to retrieve a DeviceManufacturer object.

Declaration
public virtual DeviceManufacturer GetDeviceManufacturer(GetDeviceManufacturerRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetDeviceManufacturerRequest 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
DeviceManufacturer

The RPC response.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = DeviceManufacturerServiceClient.Create();
// Initialize request argument(s)
GetDeviceManufacturerRequest request = new GetDeviceManufacturerRequest
{
    DeviceManufacturerName = DeviceManufacturerName.FromNetworkCodeDeviceManufacturer("[NETWORK_CODE]", "[DEVICE_MANUFACTURER]"),
};
// Make the request
DeviceManufacturer response = deviceManufacturerServiceClient.GetDeviceManufacturer(request);

GetDeviceManufacturer(string, CallSettings)

API to retrieve a DeviceManufacturer object.

Declaration
public virtual DeviceManufacturer GetDeviceManufacturer(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The resource name of the DeviceManufacturer. Format: networks/{network_code}/deviceManufacturers/{device_manufacturer_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DeviceManufacturer

The RPC response.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = DeviceManufacturerServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/deviceManufacturers/[DEVICE_MANUFACTURER]";
// Make the request
DeviceManufacturer response = deviceManufacturerServiceClient.GetDeviceManufacturer(name);

GetDeviceManufacturerAsync(DeviceManufacturerName, CallSettings)

API to retrieve a DeviceManufacturer object.

Declaration
public virtual Task<DeviceManufacturer> GetDeviceManufacturerAsync(DeviceManufacturerName name, CallSettings callSettings = null)
Parameters
Type Name Description
DeviceManufacturerName name

Required. The resource name of the DeviceManufacturer. Format: networks/{network_code}/deviceManufacturers/{device_manufacturer_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<DeviceManufacturer>

A Task containing the RPC response.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = await DeviceManufacturerServiceClient.CreateAsync();
// Initialize request argument(s)
DeviceManufacturerName name = DeviceManufacturerName.FromNetworkCodeDeviceManufacturer("[NETWORK_CODE]", "[DEVICE_MANUFACTURER]");
// Make the request
DeviceManufacturer response = await deviceManufacturerServiceClient.GetDeviceManufacturerAsync(name);

GetDeviceManufacturerAsync(DeviceManufacturerName, CancellationToken)

API to retrieve a DeviceManufacturer object.

Declaration
public virtual Task<DeviceManufacturer> GetDeviceManufacturerAsync(DeviceManufacturerName name, CancellationToken cancellationToken)
Parameters
Type Name Description
DeviceManufacturerName name

Required. The resource name of the DeviceManufacturer. Format: networks/{network_code}/deviceManufacturers/{device_manufacturer_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<DeviceManufacturer>

A Task containing the RPC response.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = await DeviceManufacturerServiceClient.CreateAsync();
// Initialize request argument(s)
DeviceManufacturerName name = DeviceManufacturerName.FromNetworkCodeDeviceManufacturer("[NETWORK_CODE]", "[DEVICE_MANUFACTURER]");
// Make the request
DeviceManufacturer response = await deviceManufacturerServiceClient.GetDeviceManufacturerAsync(name);

GetDeviceManufacturerAsync(GetDeviceManufacturerRequest, CallSettings)

API to retrieve a DeviceManufacturer object.

Declaration
public virtual Task<DeviceManufacturer> GetDeviceManufacturerAsync(GetDeviceManufacturerRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetDeviceManufacturerRequest 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<DeviceManufacturer>

A Task containing the RPC response.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = await DeviceManufacturerServiceClient.CreateAsync();
// Initialize request argument(s)
GetDeviceManufacturerRequest request = new GetDeviceManufacturerRequest
{
    DeviceManufacturerName = DeviceManufacturerName.FromNetworkCodeDeviceManufacturer("[NETWORK_CODE]", "[DEVICE_MANUFACTURER]"),
};
// Make the request
DeviceManufacturer response = await deviceManufacturerServiceClient.GetDeviceManufacturerAsync(request);

GetDeviceManufacturerAsync(GetDeviceManufacturerRequest, CancellationToken)

API to retrieve a DeviceManufacturer object.

Declaration
public virtual Task<DeviceManufacturer> GetDeviceManufacturerAsync(GetDeviceManufacturerRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetDeviceManufacturerRequest 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<DeviceManufacturer>

A Task containing the RPC response.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = await DeviceManufacturerServiceClient.CreateAsync();
// Initialize request argument(s)
GetDeviceManufacturerRequest request = new GetDeviceManufacturerRequest
{
    DeviceManufacturerName = DeviceManufacturerName.FromNetworkCodeDeviceManufacturer("[NETWORK_CODE]", "[DEVICE_MANUFACTURER]"),
};
// Make the request
DeviceManufacturer response = await deviceManufacturerServiceClient.GetDeviceManufacturerAsync(request);

GetDeviceManufacturerAsync(string, CallSettings)

API to retrieve a DeviceManufacturer object.

Declaration
public virtual Task<DeviceManufacturer> GetDeviceManufacturerAsync(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The resource name of the DeviceManufacturer. Format: networks/{network_code}/deviceManufacturers/{device_manufacturer_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<DeviceManufacturer>

A Task containing the RPC response.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = await DeviceManufacturerServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/deviceManufacturers/[DEVICE_MANUFACTURER]";
// Make the request
DeviceManufacturer response = await deviceManufacturerServiceClient.GetDeviceManufacturerAsync(name);

GetDeviceManufacturerAsync(string, CancellationToken)

API to retrieve a DeviceManufacturer object.

Declaration
public virtual Task<DeviceManufacturer> GetDeviceManufacturerAsync(string name, CancellationToken cancellationToken)
Parameters
Type Name Description
string name

Required. The resource name of the DeviceManufacturer. Format: networks/{network_code}/deviceManufacturers/{device_manufacturer_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<DeviceManufacturer>

A Task containing the RPC response.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = await DeviceManufacturerServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/deviceManufacturers/[DEVICE_MANUFACTURER]";
// Make the request
DeviceManufacturer response = await deviceManufacturerServiceClient.GetDeviceManufacturerAsync(name);

ListDeviceManufacturers(ListDeviceManufacturersRequest, CallSettings)

API to retrieve a list of DeviceManufacturer objects.

Declaration
public virtual PagedEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> ListDeviceManufacturers(ListDeviceManufacturersRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListDeviceManufacturersRequest 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<ListDeviceManufacturersResponse, DeviceManufacturer>

A pageable sequence of DeviceManufacturer resources.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = DeviceManufacturerServiceClient.Create();
// Initialize request argument(s)
ListDeviceManufacturersRequest request = new ListDeviceManufacturersRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> response = deviceManufacturerServiceClient.ListDeviceManufacturers(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (DeviceManufacturer 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 (ListDeviceManufacturersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DeviceManufacturer 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<DeviceManufacturer> 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 (DeviceManufacturer 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;

ListDeviceManufacturers(NetworkName, string, int?, CallSettings)

API to retrieve a list of DeviceManufacturer objects.

Declaration
public virtual PagedEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> ListDeviceManufacturers(NetworkName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent, which owns this collection of DeviceManufacturers. Format: networks/{network_code}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer>

A pageable sequence of DeviceManufacturer resources.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = DeviceManufacturerServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> response = deviceManufacturerServiceClient.ListDeviceManufacturers(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (DeviceManufacturer 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 (ListDeviceManufacturersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DeviceManufacturer 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<DeviceManufacturer> 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 (DeviceManufacturer 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;

ListDeviceManufacturers(string, string, int?, CallSettings)

API to retrieve a list of DeviceManufacturer objects.

Declaration
public virtual PagedEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> ListDeviceManufacturers(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent, which owns this collection of DeviceManufacturers. Format: networks/{network_code}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer>

A pageable sequence of DeviceManufacturer resources.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = DeviceManufacturerServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> response = deviceManufacturerServiceClient.ListDeviceManufacturers(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (DeviceManufacturer 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 (ListDeviceManufacturersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DeviceManufacturer 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<DeviceManufacturer> 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 (DeviceManufacturer 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;

ListDeviceManufacturersAsync(ListDeviceManufacturersRequest, CallSettings)

API to retrieve a list of DeviceManufacturer objects.

Declaration
public virtual PagedAsyncEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> ListDeviceManufacturersAsync(ListDeviceManufacturersRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListDeviceManufacturersRequest 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<ListDeviceManufacturersResponse, DeviceManufacturer>

A pageable asynchronous sequence of DeviceManufacturer resources.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = await DeviceManufacturerServiceClient.CreateAsync();
// Initialize request argument(s)
ListDeviceManufacturersRequest request = new ListDeviceManufacturersRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> response = deviceManufacturerServiceClient.ListDeviceManufacturersAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DeviceManufacturer 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((ListDeviceManufacturersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DeviceManufacturer 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<DeviceManufacturer> 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 (DeviceManufacturer 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;

ListDeviceManufacturersAsync(NetworkName, string, int?, CallSettings)

API to retrieve a list of DeviceManufacturer objects.

Declaration
public virtual PagedAsyncEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> ListDeviceManufacturersAsync(NetworkName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent, which owns this collection of DeviceManufacturers. Format: networks/{network_code}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer>

A pageable asynchronous sequence of DeviceManufacturer resources.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = await DeviceManufacturerServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> response = deviceManufacturerServiceClient.ListDeviceManufacturersAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DeviceManufacturer 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((ListDeviceManufacturersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DeviceManufacturer 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<DeviceManufacturer> 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 (DeviceManufacturer 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;

ListDeviceManufacturersAsync(string, string, int?, CallSettings)

API to retrieve a list of DeviceManufacturer objects.

Declaration
public virtual PagedAsyncEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> ListDeviceManufacturersAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent, which owns this collection of DeviceManufacturers. Format: networks/{network_code}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer>

A pageable asynchronous sequence of DeviceManufacturer resources.

Sample code
// Create client
DeviceManufacturerServiceClient deviceManufacturerServiceClient = await DeviceManufacturerServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListDeviceManufacturersResponse, DeviceManufacturer> response = deviceManufacturerServiceClient.ListDeviceManufacturersAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DeviceManufacturer 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((ListDeviceManufacturersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DeviceManufacturer 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<DeviceManufacturer> 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 (DeviceManufacturer 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.

In this article
Back to top Generated by DocFX