/// <summary>Snippet for GetCompany</summary>
 public void GetCompany()
 {
     // Snippet: GetCompany(CompanyNameOneof,CallSettings)
     // Create client
     CompanyServiceClient companyServiceClient = CompanyServiceClient.Create();
     // Initialize request argument(s)
     CompanyNameOneof name = CompanyNameOneof.From(new CompanyName("[PROJECT]", "[TENANT]", "[COMPANY]"));
     // Make the request
     Company response = companyServiceClient.GetCompany(name);
     // End snippet
 }
 /// <summary>Snippet for GetCompany</summary>
 public void GetCompanyResourceNames()
 {
     // Snippet: GetCompany(CompanyName, CallSettings)
     // Create client
     CompanyServiceClient companyServiceClient = CompanyServiceClient.Create();
     // Initialize request argument(s)
     CompanyName name = CompanyName.FromProjectTenantCompany("[PROJECT]", "[TENANT]", "[COMPANY]");
     // Make the request
     Company response = companyServiceClient.GetCompany(name);
     // End snippet
 }
 /// <summary>Snippet for GetCompany</summary>
 public void GetCompany()
 {
     // Snippet: GetCompany(string, CallSettings)
     // Create client
     CompanyServiceClient companyServiceClient = CompanyServiceClient.Create();
     // Initialize request argument(s)
     string name = "projects/[PROJECT]/tenants/[TENANT]/companies/[COMPANY]";
     // Make the request
     Company response = companyServiceClient.GetCompany(name);
     // End snippet
 }
Beispiel #4
0
 /// <summary>Snippet for GetCompany</summary>
 public void GetCompany()
 {
     // Snippet: GetCompany(string,CallSettings)
     // Create client
     CompanyServiceClient companyServiceClient = CompanyServiceClient.Create();
     // Initialize request argument(s)
     string formattedName = new CompanyName("[PROJECT]", "[COMPANY]").ToString();
     // Make the request
     Company response = companyServiceClient.GetCompany(formattedName);
     // End snippet
 }
 /// <summary>Snippet for GetCompany</summary>
 public void GetCompany_RequestObject()
 {
     // Snippet: GetCompany(GetCompanyRequest,CallSettings)
     // Create client
     CompanyServiceClient companyServiceClient = CompanyServiceClient.Create();
     // Initialize request argument(s)
     GetCompanyRequest request = new GetCompanyRequest
     {
         CompanyNameOneof = CompanyNameOneof.From(new CompanyName("[PROJECT]", "[TENANT]", "[COMPANY]")),
     };
     // Make the request
     Company response = companyServiceClient.GetCompany(request);
     // End snippet
 }
        internal IList <CompanyItem> GetCompanies(int id, string name, string countryCode, string type)
        {
            Company[] companies = _service.GetCompany(id, name, countryCode, type);

            return
                (companies.Select(
                     c =>
                     new CompanyItem
            {
                ID = c.ID,
                Name = c.Name,
                CountryCode = c.CountryCode,
                CompanyType = c.Type.Name
            }).ToList());
        }
Beispiel #7
0
        // [START job_search_get_company_beta]
        public static object GetCompany(string projectId, string tenantId, string companyId)
        {
            CompanyServiceClient companyServiceClient = CompanyServiceClient.Create();
            CompanyName          companyName          = CompanyName.FromProjectTenantCompany(projectId, tenantId, companyId);

            GetCompanyRequest request = new GetCompanyRequest
            {
                CompanyName = companyName
            };
            var response = companyServiceClient.GetCompany(request);

            Console.WriteLine($"Company name: {response.Name}");
            Console.WriteLine($"Display name: {response.DisplayName}");
            return(0);
        }