private void MainPageLoaded(object sender, RoutedEventArgs e) { var client = new CompanyServiceClient(); client.GetCompanyCompleted += ClientGetCompanyCompleted; client.GetCompanyAsync(); }
// Executes when the user navigates to this page. protected override void OnNavigatedTo(NavigationEventArgs e) { var client = new CompanyServiceClient(); client.GetCompanyCompleted += client_GetCompanyCompleted; client.GetCompanyAsync(); }
/// <summary>Snippet for GetCompanyAsync</summary> public async Task GetCompanyAsync() { // Snippet: GetCompanyAsync(CompanyNameOneof,CallSettings) // Additional: GetCompanyAsync(CompanyNameOneof,CancellationToken) // Create client CompanyServiceClient companyServiceClient = await CompanyServiceClient.CreateAsync(); // Initialize request argument(s) CompanyNameOneof name = CompanyNameOneof.From(new CompanyName("[PROJECT]", "[TENANT]", "[COMPANY]")); // Make the request Company response = await companyServiceClient.GetCompanyAsync(name); // End snippet }
/// <summary>Snippet for GetCompanyAsync</summary> public async Task GetCompanyAsync() { // Snippet: GetCompanyAsync(string, CallSettings) // Additional: GetCompanyAsync(string, CancellationToken) // Create client CompanyServiceClient companyServiceClient = await CompanyServiceClient.CreateAsync(); // Initialize request argument(s) string name = "projects/[PROJECT]/tenants/[TENANT]/companies/[COMPANY]"; // Make the request Company response = await companyServiceClient.GetCompanyAsync(name); // End snippet }
/// <summary>Snippet for GetCompanyAsync</summary> public async Task GetCompanyResourceNamesAsync() { // Snippet: GetCompanyAsync(CompanyName, CallSettings) // Additional: GetCompanyAsync(CompanyName, CancellationToken) // Create client CompanyServiceClient companyServiceClient = await CompanyServiceClient.CreateAsync(); // Initialize request argument(s) CompanyName name = CompanyName.FromProjectCompany("[PROJECT]", "[COMPANY]"); // Make the request Company response = await companyServiceClient.GetCompanyAsync(name); // End snippet }
/// <summary>Snippet for GetCompanyAsync</summary> public async Task GetCompanyAsync() { // Snippet: GetCompanyAsync(string,CallSettings) // Additional: GetCompanyAsync(string,CancellationToken) // Create client CompanyServiceClient companyServiceClient = await CompanyServiceClient.CreateAsync(); // Initialize request argument(s) string formattedName = new CompanyName("[PROJECT]", "[COMPANY]").ToString(); // Make the request Company response = await companyServiceClient.GetCompanyAsync(formattedName); // End snippet }
/// <summary>Snippet for GetCompanyAsync</summary> public async Task GetCompanyRequestObjectAsync() { // Snippet: GetCompanyAsync(GetCompanyRequest, CallSettings) // Additional: GetCompanyAsync(GetCompanyRequest, CancellationToken) // Create client CompanyServiceClient companyServiceClient = await CompanyServiceClient.CreateAsync(); // Initialize request argument(s) GetCompanyRequest request = new GetCompanyRequest { CompanyName = CompanyName.FromProjectTenantCompany("[PROJECT]", "[TENANT]", "[COMPANY]"), }; // Make the request Company response = await companyServiceClient.GetCompanyAsync(request); // End snippet }