Beispiel #1
0
        public EventGridHandler(IEventGridClient eventGridClient, IOptions <EventGridOptions> settings)
        {
            _eventGridClient = eventGridClient ??
                               throw new ArgumentNullException(nameof(eventGridClient));

            _eventGridOptions = settings.Value;
        }
        public AzureEventGridClient(IAzureEventGridClientConfiguration configuration)
        {
            _configuration = configuration;

            var topicCredentials = new TopicCredentials(_configuration.TopicKey);

            _eventGridClient = new EventGridClient(topicCredentials);
        }
Beispiel #3
0
        public GalaxyAzureEventGridBus(IEventGridClient eventGridClient, IGalaxyAzureEventGridConfigurations configurations)
        {
            _configurations = configurations ?? throw new ArgumentNullException(nameof(configurations));

            _eventGridClient = eventGridClient ?? throw new ArgumentNullException(nameof(eventGridClient));

            _topicHostName = new Uri(configurations.TopicUrl).Host;
        }
 public EventGridEventClient(
     IDateTimeProvider dateTimeProvider,
     IEventGridClient eventGridClient,
     IConnectionStringProvider connectionStringProvider)
 {
     _dateTimeProvider         = dateTimeProvider;
     _eventGridClient          = eventGridClient;
     _connectionStringProvider = connectionStringProvider;
 }
Beispiel #5
0
 /// <summary>
 /// Initialize a new instance of <see cref="EventGridEventPublisher"/>.
 /// </summary>
 /// <param name="eventGridClient">The client used to publish SendGrid events to an Azure EventGrid topic.</param>
 /// <param name="topicUri">The Azure EventGrid topic endpoint where events will be published.</param>
 /// <param name="settings">Settings used to help build events.</param>
 public EventGridEventPublisher(
     IEventGridClient eventGridClient,
     Uri topicUri,
     EventGridEventPublisherSettings settings = null)
 {
     _eventGridClient = eventGridClient ?? throw new ArgumentNullException(nameof(eventGridClient));
     _topicUri        = topicUri ?? throw new ArgumentNullException(nameof(topicUri));
     _settings        = settings ?? EventGridEventPublisherSettings.Default;
 }
Beispiel #6
0
 /// <summary>
 /// Publishes a batch of events to an Azure Event Grid topic.
 /// </summary>
 /// <param name="operations">
 /// The operations group for this extension method.
 /// </param>
 /// <param name="topicHostname">
 /// The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net
 /// </param>
 /// <param name="events">
 /// An array of events to be published to Event Grid.
 /// </param>
 /// <param name="cancellationToken">The cancellation token.</param>
 public static async Task PublishEventsAsync <T>(this IEventGridClient operations, string topicHostname, T data, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.PublishEventsWithHttpMessagesAsync(topicHostname, events, (Dictionary <string, List <string> >)null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 public EventGridPublisher(IEventGridClient client, string hostName) => (Client, HostName) = (client, hostName);
 public ServerlessTelegramBotOrderManagement(ITelegramBotClient client, IEventGridClient eventGridClient)
 {
     botClient = client;
     eGClient  = eventGridClient;
 }
 public TelegramBotWebHook(ITelegramBotClient client, IEventGridClient eventGridClient)
 {
     botClient = client;
     eGClient  = eventGridClient;
 }
 public EventGridGateway(IEventGridClient eventGridClient)
 {
     _eventGridClient = eventGridClient;
 }
Beispiel #11
0
 internal EventGridCluster(IEventGridClient client)
 {
     this.topicHosts = ((TopicCredentialSet)client.Credentials).TopicHosts;
     this.client     = client;
 }
 public void Init()
 {
     _eventGridClient = Substitute.For <IEventGridClient>();
     _sut             = new EventGridEventPublisher(_eventGridClient, _topicUri);
 }
 /// <summary>
 /// Publishes a batch of events to an Azure Event Grid topic.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='topicHostname'>
 /// The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.net
 /// </param>
 /// <param name='events'>
 /// An array of events to be published to Event Grid.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PublishEventsAsync(this IEventGridClient operations, string topicHostname, IList <EventGridEvent> events, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.PublishEventsWithHttpMessagesAsync(topicHostname, events, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 public EventGridAsyncCollector(IEventGridClient client, string topicEndpointUri)
 {
     _client        = client;
     _topicHostname = new Uri(topicEndpointUri).Host;
 }