Ejemplo n.º 1
0
        /// <summary>Snippet for GetContactAsync</summary>
        public async Task GetContactResourceNamesAsync()
        {
            // Snippet: GetContactAsync(ContactName, CallSettings)
            // Additional: GetContactAsync(ContactName, CancellationToken)
            // Create client
            EssentialContactsServiceClient essentialContactsServiceClient = await EssentialContactsServiceClient.CreateAsync();

            // Initialize request argument(s)
            ContactName name = ContactName.FromProjectContact("[PROJECT]", "[CONTACT]");
            // Make the request
            Contact response = await essentialContactsServiceClient.GetContactAsync(name);

            // End snippet
        }
Ejemplo n.º 2
0
        /// <summary>Snippet for GetContactAsync</summary>
        public async Task GetContactAsync()
        {
            // Snippet: GetContactAsync(string, CallSettings)
            // Additional: GetContactAsync(string, CancellationToken)
            // Create client
            EssentialContactsServiceClient essentialContactsServiceClient = await EssentialContactsServiceClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/contacts/[CONTACT]";
            // Make the request
            Contact response = await essentialContactsServiceClient.GetContactAsync(name);

            // End snippet
        }