public void Stop() { if (_sqlNotificationListener != null) { _sqlNotificationListener.OnChanged -= SqlNotificationListenerOnOnChanged; _sqlNotificationListener.StopMonitor(); _sqlNotificationListener = null; } }
public void Start() { _sqlNotificationListener = _sqlNotificationListenerFactory.Create(); _sqlNotificationListener.OnChanged += SqlNotificationListenerOnOnChanged; _sqlNotificationListener.StartMonitor(); _sqlNotificationListener.RegisterSqlDependency(); }