private void EventProcessingIteration(RequestStopHandler requestStopHandler) { if (!_eventQueue.TryTake(out var pluginEvent, 100)) { return; } switch (pluginEvent.PluginEventType) { case PluginEventType.Change: ChangeMessage?.Invoke(pluginEvent.Data); break; case PluginEventType.Module: ModuleMessage?.Invoke(pluginEvent.Data); break; default: Log.Error("Unknown event type received in {@Event}", pluginEvent); break; } }
/// <summary> /// Raises <see cref="ChangeMessage"/> event /// </summary> protected virtual void RaiseChangeMessage(string e) { ChangeMessage?.Invoke(this, e); }