Show / Hide Table of Contents

Class ThirdPartyCompanyServiceClient

ThirdPartyCompanyService client wrapper, for convenient use.

Inheritance
object
ThirdPartyCompanyServiceClient
ThirdPartyCompanyServiceClientImpl
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 ThirdPartyCompanyServiceClient
Remarks

Service to retrieve and list recognized third-party companies in Google Ad Manager.

Properties

DefaultEndpoint

The default endpoint for the ThirdPartyCompanyService 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 ThirdPartyCompanyService scopes.

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

The default ThirdPartyCompanyService scopes are:

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

GrpcClient

The underlying gRPC ThirdPartyCompanyService client

Declaration
public virtual ThirdPartyCompanyService.ThirdPartyCompanyServiceClient GrpcClient { get; }
Property Value
Type Description
ThirdPartyCompanyService.ThirdPartyCompanyServiceClient

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

Declaration
public static ThirdPartyCompanyServiceClient Create()
Returns
Type Description
ThirdPartyCompanyServiceClient

The created ThirdPartyCompanyServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<ThirdPartyCompanyServiceClient>

The task representing the created ThirdPartyCompanyServiceClient.

GetThirdPartyCompany(GetThirdPartyCompanyRequest, CallSettings)

Retrieves a ThirdPartyCompany object.

Declaration
public virtual ThirdPartyCompany GetThirdPartyCompany(GetThirdPartyCompanyRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetThirdPartyCompanyRequest 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
ThirdPartyCompany

The RPC response.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = ThirdPartyCompanyServiceClient.Create();
// Initialize request argument(s)
GetThirdPartyCompanyRequest request = new GetThirdPartyCompanyRequest
{
    ThirdPartyCompanyName = ThirdPartyCompanyName.FromNetworkCodeThirdPartyCompany("[NETWORK_CODE]", "[THIRD_PARTY_COMPANY]"),
};
// Make the request
ThirdPartyCompany response = thirdPartyCompanyServiceClient.GetThirdPartyCompany(request);

GetThirdPartyCompany(ThirdPartyCompanyName, CallSettings)

Retrieves a ThirdPartyCompany object.

Declaration
public virtual ThirdPartyCompany GetThirdPartyCompany(ThirdPartyCompanyName name, CallSettings callSettings = null)
Parameters
Type Name Description
ThirdPartyCompanyName name

Required. The resource name of the ThirdPartyCompany. Format: networks/{network_code}/thirdPartyCompanies/{third_party_company_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ThirdPartyCompany

The RPC response.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = ThirdPartyCompanyServiceClient.Create();
// Initialize request argument(s)
ThirdPartyCompanyName name = ThirdPartyCompanyName.FromNetworkCodeThirdPartyCompany("[NETWORK_CODE]", "[THIRD_PARTY_COMPANY]");
// Make the request
ThirdPartyCompany response = thirdPartyCompanyServiceClient.GetThirdPartyCompany(name);

GetThirdPartyCompany(string, CallSettings)

Retrieves a ThirdPartyCompany object.

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

Required. The resource name of the ThirdPartyCompany. Format: networks/{network_code}/thirdPartyCompanies/{third_party_company_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ThirdPartyCompany

The RPC response.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = ThirdPartyCompanyServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/thirdPartyCompanies/[THIRD_PARTY_COMPANY]";
// Make the request
ThirdPartyCompany response = thirdPartyCompanyServiceClient.GetThirdPartyCompany(name);

GetThirdPartyCompanyAsync(GetThirdPartyCompanyRequest, CallSettings)

Retrieves a ThirdPartyCompany object.

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

A Task containing the RPC response.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = await ThirdPartyCompanyServiceClient.CreateAsync();
// Initialize request argument(s)
GetThirdPartyCompanyRequest request = new GetThirdPartyCompanyRequest
{
    ThirdPartyCompanyName = ThirdPartyCompanyName.FromNetworkCodeThirdPartyCompany("[NETWORK_CODE]", "[THIRD_PARTY_COMPANY]"),
};
// Make the request
ThirdPartyCompany response = await thirdPartyCompanyServiceClient.GetThirdPartyCompanyAsync(request);

GetThirdPartyCompanyAsync(GetThirdPartyCompanyRequest, CancellationToken)

Retrieves a ThirdPartyCompany object.

Declaration
public virtual Task<ThirdPartyCompany> GetThirdPartyCompanyAsync(GetThirdPartyCompanyRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetThirdPartyCompanyRequest 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<ThirdPartyCompany>

A Task containing the RPC response.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = await ThirdPartyCompanyServiceClient.CreateAsync();
// Initialize request argument(s)
GetThirdPartyCompanyRequest request = new GetThirdPartyCompanyRequest
{
    ThirdPartyCompanyName = ThirdPartyCompanyName.FromNetworkCodeThirdPartyCompany("[NETWORK_CODE]", "[THIRD_PARTY_COMPANY]"),
};
// Make the request
ThirdPartyCompany response = await thirdPartyCompanyServiceClient.GetThirdPartyCompanyAsync(request);

GetThirdPartyCompanyAsync(ThirdPartyCompanyName, CallSettings)

Retrieves a ThirdPartyCompany object.

Declaration
public virtual Task<ThirdPartyCompany> GetThirdPartyCompanyAsync(ThirdPartyCompanyName name, CallSettings callSettings = null)
Parameters
Type Name Description
ThirdPartyCompanyName name

Required. The resource name of the ThirdPartyCompany. Format: networks/{network_code}/thirdPartyCompanies/{third_party_company_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<ThirdPartyCompany>

A Task containing the RPC response.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = await ThirdPartyCompanyServiceClient.CreateAsync();
// Initialize request argument(s)
ThirdPartyCompanyName name = ThirdPartyCompanyName.FromNetworkCodeThirdPartyCompany("[NETWORK_CODE]", "[THIRD_PARTY_COMPANY]");
// Make the request
ThirdPartyCompany response = await thirdPartyCompanyServiceClient.GetThirdPartyCompanyAsync(name);

GetThirdPartyCompanyAsync(ThirdPartyCompanyName, CancellationToken)

Retrieves a ThirdPartyCompany object.

Declaration
public virtual Task<ThirdPartyCompany> GetThirdPartyCompanyAsync(ThirdPartyCompanyName name, CancellationToken cancellationToken)
Parameters
Type Name Description
ThirdPartyCompanyName name

Required. The resource name of the ThirdPartyCompany. Format: networks/{network_code}/thirdPartyCompanies/{third_party_company_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<ThirdPartyCompany>

A Task containing the RPC response.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = await ThirdPartyCompanyServiceClient.CreateAsync();
// Initialize request argument(s)
ThirdPartyCompanyName name = ThirdPartyCompanyName.FromNetworkCodeThirdPartyCompany("[NETWORK_CODE]", "[THIRD_PARTY_COMPANY]");
// Make the request
ThirdPartyCompany response = await thirdPartyCompanyServiceClient.GetThirdPartyCompanyAsync(name);

GetThirdPartyCompanyAsync(string, CallSettings)

Retrieves a ThirdPartyCompany object.

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

Required. The resource name of the ThirdPartyCompany. Format: networks/{network_code}/thirdPartyCompanies/{third_party_company_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<ThirdPartyCompany>

A Task containing the RPC response.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = await ThirdPartyCompanyServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/thirdPartyCompanies/[THIRD_PARTY_COMPANY]";
// Make the request
ThirdPartyCompany response = await thirdPartyCompanyServiceClient.GetThirdPartyCompanyAsync(name);

GetThirdPartyCompanyAsync(string, CancellationToken)

Retrieves a ThirdPartyCompany object.

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

Required. The resource name of the ThirdPartyCompany. Format: networks/{network_code}/thirdPartyCompanies/{third_party_company_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<ThirdPartyCompany>

A Task containing the RPC response.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = await ThirdPartyCompanyServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/thirdPartyCompanies/[THIRD_PARTY_COMPANY]";
// Make the request
ThirdPartyCompany response = await thirdPartyCompanyServiceClient.GetThirdPartyCompanyAsync(name);

ListThirdPartyCompanies(ListThirdPartyCompaniesRequest, CallSettings)

Lists ThirdPartyCompany objects.

Declaration
public virtual PagedEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> ListThirdPartyCompanies(ListThirdPartyCompaniesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListThirdPartyCompaniesRequest 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<ListThirdPartyCompaniesResponse, ThirdPartyCompany>

A pageable sequence of ThirdPartyCompany resources.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = ThirdPartyCompanyServiceClient.Create();
// Initialize request argument(s)
ListThirdPartyCompaniesRequest request = new ListThirdPartyCompaniesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> response = thirdPartyCompanyServiceClient.ListThirdPartyCompanies(request);

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

ListThirdPartyCompanies(NetworkName, string, int?, CallSettings)

Lists ThirdPartyCompany objects.

Declaration
public virtual PagedEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> ListThirdPartyCompanies(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 ThirdPartyCompanies. 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<ListThirdPartyCompaniesResponse, ThirdPartyCompany>

A pageable sequence of ThirdPartyCompany resources.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = ThirdPartyCompanyServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> response = thirdPartyCompanyServiceClient.ListThirdPartyCompanies(parent);

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

ListThirdPartyCompanies(string, string, int?, CallSettings)

Lists ThirdPartyCompany objects.

Declaration
public virtual PagedEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> ListThirdPartyCompanies(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 ThirdPartyCompanies. 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<ListThirdPartyCompaniesResponse, ThirdPartyCompany>

A pageable sequence of ThirdPartyCompany resources.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = ThirdPartyCompanyServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> response = thirdPartyCompanyServiceClient.ListThirdPartyCompanies(parent);

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

ListThirdPartyCompaniesAsync(ListThirdPartyCompaniesRequest, CallSettings)

Lists ThirdPartyCompany objects.

Declaration
public virtual PagedAsyncEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> ListThirdPartyCompaniesAsync(ListThirdPartyCompaniesRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListThirdPartyCompaniesRequest 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<ListThirdPartyCompaniesResponse, ThirdPartyCompany>

A pageable asynchronous sequence of ThirdPartyCompany resources.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = await ThirdPartyCompanyServiceClient.CreateAsync();
// Initialize request argument(s)
ListThirdPartyCompaniesRequest request = new ListThirdPartyCompaniesRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> response = thirdPartyCompanyServiceClient.ListThirdPartyCompaniesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ThirdPartyCompany item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListThirdPartyCompaniesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ThirdPartyCompany 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<ThirdPartyCompany> 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 (ThirdPartyCompany 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;

ListThirdPartyCompaniesAsync(NetworkName, string, int?, CallSettings)

Lists ThirdPartyCompany objects.

Declaration
public virtual PagedAsyncEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> ListThirdPartyCompaniesAsync(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 ThirdPartyCompanies. 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<ListThirdPartyCompaniesResponse, ThirdPartyCompany>

A pageable asynchronous sequence of ThirdPartyCompany resources.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = await ThirdPartyCompanyServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> response = thirdPartyCompanyServiceClient.ListThirdPartyCompaniesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ThirdPartyCompany item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListThirdPartyCompaniesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ThirdPartyCompany 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<ThirdPartyCompany> 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 (ThirdPartyCompany 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;

ListThirdPartyCompaniesAsync(string, string, int?, CallSettings)

Lists ThirdPartyCompany objects.

Declaration
public virtual PagedAsyncEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> ListThirdPartyCompaniesAsync(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 ThirdPartyCompanies. 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<ListThirdPartyCompaniesResponse, ThirdPartyCompany>

A pageable asynchronous sequence of ThirdPartyCompany resources.

Sample code
// Create client
ThirdPartyCompanyServiceClient thirdPartyCompanyServiceClient = await ThirdPartyCompanyServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListThirdPartyCompaniesResponse, ThirdPartyCompany> response = thirdPartyCompanyServiceClient.ListThirdPartyCompaniesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (ThirdPartyCompany item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListThirdPartyCompaniesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ThirdPartyCompany 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<ThirdPartyCompany> 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 (ThirdPartyCompany 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