|  |  | 1 |  | // <auto-generated> | 
|  |  | 2 |  | // Copyright (c) Microsoft Corporation. All rights reserved. | 
|  |  | 3 |  | // Licensed under the MIT License. See License.txt in the project root for | 
|  |  | 4 |  | // license information. | 
|  |  | 5 |  | // | 
|  |  | 6 |  | // Code generated by Microsoft (R) AutoRest Code Generator. | 
|  |  | 7 |  | // Changes may cause incorrect behavior and will be lost if the code is | 
|  |  | 8 |  | // regenerated. | 
|  |  | 9 |  | // </auto-generated> | 
|  |  | 10 |  |  | 
|  |  | 11 |  | namespace Microsoft.Azure.EventGrid | 
|  |  | 12 |  | { | 
|  |  | 13 |  |     using Microsoft.Rest; | 
|  |  | 14 |  |     using Microsoft.Rest.Azure; | 
|  |  | 15 |  |     using Models; | 
|  |  | 16 |  |     using System.Collections; | 
|  |  | 17 |  |     using System.Collections.Generic; | 
|  |  | 18 |  |     using System.Threading; | 
|  |  | 19 |  |     using System.Threading.Tasks; | 
|  |  | 20 |  |  | 
|  |  | 21 |  |     /// <summary> | 
|  |  | 22 |  |     /// Extension methods for EventGridClient. | 
|  |  | 23 |  |     /// </summary> | 
|  |  | 24 |  |     public static partial class EventGridClientExtensions | 
|  |  | 25 |  |     { | 
|  |  | 26 |  |             /// <summary> | 
|  |  | 27 |  |             /// Publishes a batch of events to an Azure Event Grid topic. | 
|  |  | 28 |  |             /// </summary> | 
|  |  | 29 |  |             /// <param name='operations'> | 
|  |  | 30 |  |             /// The operations group for this extension method. | 
|  |  | 31 |  |             /// </param> | 
|  |  | 32 |  |             /// <param name='topicHostname'> | 
|  |  | 33 |  |             /// The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net | 
|  |  | 34 |  |             /// </param> | 
|  |  | 35 |  |             /// <param name='events'> | 
|  |  | 36 |  |             /// An array of events to be published to Event Grid. | 
|  |  | 37 |  |             /// </param> | 
|  |  | 38 |  |             /// <param name='cancellationToken'> | 
|  |  | 39 |  |             /// The cancellation token. | 
|  |  | 40 |  |             /// </param> | 
|  |  | 41 |  |             public static async Task PublishEventsAsync(this IEventGridClient operations, string topicHostname, IList<Ev | 
|  |  | 42 |  |             { | 
|  | 2 | 43 |  |                 (await operations.PublishEventsWithHttpMessagesAsync(topicHostname, events, null, cancellationToken).Con | 
|  | 2 | 44 |  |             } | 
|  |  | 45 |  |  | 
|  |  | 46 |  |     } | 
|  |  | 47 |  | } |