static async Task Main(string[] args) { Console.WriteLine("Hello World from EventHub connector!"); var eventHubConnector = new EventHubConnector( eventHubAddress: "http://localhost:9500/events", restApiAddress: "http://localhost:1010/api/"); eventHubConnector.InfrastructureEventReceived += InfrastructureEventReceived; eventHubConnector.TrafficEventReceived += TrafficEventReceived; await eventHubConnector.StartAsync(); Console.WriteLine("Press any key to stop application..."); Console.ReadKey(); await eventHubConnector.StopAsync(); }
public override void Action(string message, CirrusDataSource cirrus) { base.Action(message, cirrus); Console.WriteLine("Sending to Event Hub {0}", DateTime.Now); EventHubConnector.SendMessage(message); }