Пример #1
0
        /// <summary>
        ///     Connects a new ReceieveEndpoint to the BusService with queuename according to configuration
        /// </summary>
        /// <param name="busService">The BusService that this EventService should use</param>
        /// <param name="action">Configuration for the EventService</param>
        protected EventService(IBusService busService, IEventServiceConfiguration action)
        {
            _busService    = busService;
            _configuration = action;

            busService.ConnectHandlerAsync(_configuration.EventQueueName, EventMessageReceived, CancellationToken.None)
            .Wait();

            _eventHandlers = new List <IEventHandler>();
        }