public void StartListening() { using (Logger.BeginScope(LoggerHelper.GetCaller())) { _remoteEvent?.Dispose(); _remoteEvent = new FbRemoteEvent(ConnectionString); var events = _triggers.Select(item => item.EventName).ToList(); _remoteEvent.QueueEvents(events.ToArray()); _remoteEvent.RemoteEventCounts += OnDbEvent; var eventsStr = events.Aggregate("", (current, item) => current + $"{item} "); Logger.LogDebug($"Listening events: {eventsStr}"); } }
public void Dispose() { _remoteEvent?.Dispose(); }