示例#1
0
        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}");
            }
        }
示例#2
0
 public void Dispose()
 {
     _remoteEvent?.Dispose();
 }