/// <summary> /// Create a new instance of the ProcessingServer /// </summary> /// <param name="factory"></param> public ProcessingServer(IEventBusFactory factory) { _eventBusFactory = factory ?? throw new ArgumentNullException(nameof(factory)); _inputHandlers = new InputHandlerCollection(); _logger = LoggerConfiguration.Setup(); }
public static IEventBus CreateEventBus(this IEventBusFactory factory) { if (factory == null) { throw new ArgumentNullException(nameof(factory)); } return(factory.CreateEventBus(string.Empty)); }
public EventBusHostedService(string configurationName, IEventBusFactory eventBusFactory, ILoggerFactory loggerFactory) { _logger = loggerFactory.CreateLogger <EventBusHostedService>(); eventBus = eventBusFactory.Create(configurationName); }
/// <summary> /// Register a new <see cref="IEventPipeline"/> factory to the EventBusFactory /// </summary> /// <param name="busFactory"></param> /// <param name="pipelineId"></param> /// <param name="factory"></param> public static void Register(this IEventBusFactory busFactory, string pipelineId, Func <IEventPipeline> factory) => busFactory.Register(pipelineId, factory, new PipelineOptions());