예제 #1
0
 public void Stop()
 {
     if (_sqlNotificationListener != null)
     {
         _sqlNotificationListener.OnChanged -= SqlNotificationListenerOnOnChanged;
         _sqlNotificationListener.StopMonitor();
         _sqlNotificationListener = null;
     }
 }
예제 #2
0
        public void Start()
        {
            _sqlNotificationListener = _sqlNotificationListenerFactory.Create();

            _sqlNotificationListener.OnChanged += SqlNotificationListenerOnOnChanged;

            _sqlNotificationListener.StartMonitor();

            _sqlNotificationListener.RegisterSqlDependency();
        }