protected override void OnStarted() { if (this.loadingInterval > TimeSpan.Zero) { lock (this.timerLock) { base.OnStarted(); this.loadingTimer = new SmartTimer(new TimerCallback(this.LoadWorkflowsWithExpiredTimers), null, this.loadingInterval, this.loadingInterval); } } this.RecoverRunningWorkflowInstances(); }
protected internal override void Stop() { WorkflowTrace.Host.TraceEvent(TraceEventType.Information, 0, "SqlWorkflowPersistenceService({0}): Stopping", new object[] { this._serviceInstanceId.ToString() }); lock (this.timerLock) { base.Stop(); if (this.loadingTimer != null) { this.loadingTimer.Dispose(); this.loadingTimer = null; } } }