예제 #1
0
파일: Program.cs 프로젝트: Macrix/procontel
        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();
        }
예제 #2
0
 public override void Action(string message, CirrusDataSource cirrus)
 {
     base.Action(message, cirrus);
     Console.WriteLine("Sending to Event Hub {0}", DateTime.Now);
     EventHubConnector.SendMessage(message);
 }