Microsoft.Silverlight.Testing.Harness.CompositeWorkItem.Enqueue C# (CSharp) Method

Enqueue() public method

Add a new callback action and schedule it for invocation.
public Enqueue ( System.Action action ) : void
action System.Action The action.
return void
        public void Enqueue(Action action)
        {
            Enqueue(new CallbackWorkItem(action));
        }

Same methods

CompositeWorkItem::Enqueue ( WorkItem item ) : void

Usage Example

コード例 #1
0
        /// <summary>
        /// Publish final results. If not yet ready, will keep waiting around
        /// as a work item until it is done.
        /// </summary>
        private void PublishFinalResults()
        {
            if (TestService != null && TestService.BusyServiceReferenceCounter > 0)
            {
                if (_harnessTasks == null)
                {
                    _harnessTasks = new CompositeWorkItem();
                }
                _harnessTasks.Enqueue(new CallbackWorkItem(() => { }));
                _harnessTasks.Enqueue(new CallbackWorkItem(PublishFinalResults));
                if (RunDispatcher == null)
                {
                    RunDispatcher = RunDispatcher.Create(RunNextStep, Dispatcher);
                    RunDispatcher.Run();
                }
            }
            else
            {
                _harnessTasks = null;
                RunDispatcher = null;
                PublishFinalResult();

                if (IsReportingTestServiceConnected())
                {
                    SetOverallStatus("Reporting complete...");
                }
            }
        }
All Usage Examples Of Microsoft.Silverlight.Testing.Harness.CompositeWorkItem::Enqueue