Example #1
0
        private void Stop(object source, WorkflowRuntimeEventArgs e)
        {
            Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugController.ServiceContainerStopped():"));

            try
            {
                lock (this.syncRoot)
                {
                    Detach();
                    this.programPublisher.Unpublish();

                    // See comments in Attach().
                    this.isZombie = true;
                }
            }
            catch
            {
                // Do not throw exceptions back!
            }
        }
Example #2
0
 private void _runtime_Started(object sender, WorkflowRuntimeEventArgs e)
 {
     LogStatus(Guid.Empty, "Started");
     _startHandle.Set();
 }
Example #3
0
        private void Start(object source, WorkflowRuntimeEventArgs e)
        {
            Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "WDE: DebugController.ServiceContainerStarted():"));

            this.isZombie = false;
            this.isAttached = false;
            this.eventConduitAttached = new ManualResetEvent(false);
            this.isServiceContainerStarting = true;

            bool published = this.programPublisher.Publish(this);

            // If the debugger is already attached, then the DE will invoke AttachToConduit() on a separate thread.
            // We need to wait for that to happen to prevent new instances being created and causing a ----. See
            // comments in ControllerConduit.ProgramCreated(). However, if the DE never calls AttachToConduit(),
            // and the detaches instead, we set a wait timeout to that of our Attach Timer.
            // Note that when we publish the program node, if the debugger is attached, isAttached will be set to true
            // when the debugger calls Attach() on the Program Node!

            while (published && this.isAttached && !this.eventConduitAttached.WaitOne(attachTimeout, false));
            this.isServiceContainerStarting = false;
        }
Example #4
0
        private void _runtime_Stopped(object sender, WorkflowRuntimeEventArgs e)
        {
            LogStatus(Guid.Empty, "Stopped");

        }
 private void HandleStopped(object source, WorkflowRuntimeEventArgs e)
 {
     this.state = WorkflowRuntimeServiceState.Stopped;
     this.OnStopped();
 }
Example #6
0
 void wfRuntime_Started(object sender, WorkflowRuntimeEventArgs e)
 {
     string v = string.Format("{0}引擎,在{1},发生{2}", wfRuntime.Name, System.DateTime.Now.ToString(), "Started");
     lsWFEvent.Add(v);
 }
 private void Stop(object source, WorkflowRuntimeEventArgs e)
 {
     try
     {
         lock (this.syncRoot)
         {
             this.Detach();
             this.programPublisher.Unpublish();
             this.isZombie = true;
         }
     }
     catch
     {
     }
 }
 private void Start(object source, WorkflowRuntimeEventArgs e)
 {
     this.isZombie = false;
     this.isAttached = false;
     this.eventConduitAttached = new ManualResetEvent(false);
     this.isServiceContainerStarting = true;
     bool flag = this.programPublisher.Publish(this);
     while ((flag && this.isAttached) && !this.eventConduitAttached.WaitOne(this.attachTimeout, false))
     {
     }
     this.isServiceContainerStarting = false;
 }