Beispiel #1
0
        public void StartEventSource(IEventSource source)
        {
            _container.BuildUp(source);
            _eventSources.Add(source);

            source.LoadConfig(_container.Resolve <IPluginConfig>());
            source.Start();

            EventSourceRegistered?.Invoke(null, new EventSourceRegisteredEventArgs(source));
        }
Beispiel #2
0
        public static void RegisterEventSource(IEventSource source)
        {
            Container.BuildUp(source);
            _eventSources.Add(source);

            // If an event source is registered at runtime, we have to load the config
            // and start it immeditately.
            if (_esReady)
            {
                source.LoadConfig(Container.Resolve <IPluginConfig>());
                source.Start();

                EventSourceRegistered?.Invoke(null, new EventSourceRegisteredEventArgs(source));
            }
        }