virtual internal protected void Stop() { if (_runtime == null) throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, ExecutionStringManager.ServiceNotAddedToRuntime, this.GetType().Name)); if (state.Equals(WorkflowRuntimeServiceState.Stopped)) throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, ExecutionStringManager.ServiceNotStarted, this.GetType().Name)); state = WorkflowRuntimeServiceState.Stopping; }
protected internal virtual void Stop() { if (this._runtime == null) { throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, ExecutionStringManager.ServiceNotAddedToRuntime, new object[] { base.GetType().Name })); } if (this.state.Equals(WorkflowRuntimeServiceState.Stopped)) { throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, ExecutionStringManager.ServiceNotStarted, new object[] { base.GetType().Name })); } this.state = WorkflowRuntimeServiceState.Stopping; }
virtual internal protected void Start() { if (_runtime == null) { throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, ExecutionStringManager.ServiceNotAddedToRuntime, this.GetType().Name)); } if (state.Equals(WorkflowRuntimeServiceState.Started)) { throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, ExecutionStringManager.ServiceAlreadyStarted, this.GetType().Name)); } state = WorkflowRuntimeServiceState.Starting; }
protected WorkflowRuntimeService() { state = WorkflowRuntimeServiceState.Stopped; }
protected WorkflowRuntimeService () { state = WorkflowRuntimeServiceState.Stopped; }
private void HandleStarted(object source, WorkflowRuntimeEventArgs e) { state = WorkflowRuntimeServiceState.Started; this.OnStarted(); }
private void HandleStopped(object source, WorkflowRuntimeEventArgs e) { this.state = WorkflowRuntimeServiceState.Stopped; this.OnStopped(); }