C# Class Microsoft.Silverlight.Testing.Harness.CompositeWorkItem

TestWorkItem which can contain sub-tasks; the underlying work item is not marked complete until the Children have completed or an Exception is thrown.
Inheritance: WorkItem
Afficher le fichier Open project: garyjohnson/wpnest Class Usage Examples

Méthodes publiques

Méthode Description
CompositeWorkItem ( ) : System

Constructor for the TestTaskContainer type.

Dequeue ( ) : WorkItem

Dequeue a work item.

Enqueue ( System.Action action ) : void

Add a new callback action and schedule it for invocation.

Enqueue ( WorkItem item ) : void

Add a new work item to the container to schedule it for invocation.

EnqueueQuick ( System.Action action ) : void

Enqueues a callback or action that will quickly execute.

EnqueueQuick ( WorkItem item ) : void

Adds a new work item that will execute more quickly.

Invoke ( ) : bool

Invoke the test container; in turn will execute child work items as needed. Supports executing multiple items immediately for performance reasons.

Peek ( ) : WorkItem

Return the top work item, if any, from this container.

Méthodes protégées

Méthode Description
ClearChildren ( ) : void

Clear the children.

FirstInvoke ( ) : void

Optional method to call on the first invoke.

OnComplete ( EventArgs e ) : void

Fire the Complete event.

OnUnhandledException ( Exception exception ) : void

Fire the unhandled exception event.

WorkItemComplete ( ) : void

Work items must call this method to indicate completion of the work item; in turn fires the Complete event delegates.

Private Methods

Méthode Description
Invoke ( WorkItem &usedWorkItem ) : bool
WorkItemCompleteInternal ( ) : void

Internal-only version which can be called during a test completion through the relation - not necessarily the best design; events may make more sense long-term.

WorkItemException ( Exception e ) : void

Call when an exception occurs inside a work item.

Method Details

ClearChildren() protected méthode

Clear the children.
protected ClearChildren ( ) : void
Résultat void

CompositeWorkItem() public méthode

Constructor for the TestTaskContainer type.
public CompositeWorkItem ( ) : System
Résultat System

Dequeue() public méthode

Dequeue a work item.
public Dequeue ( ) : WorkItem
Résultat WorkItem

Enqueue() public méthode

Add a new callback action and schedule it for invocation.
public Enqueue ( System.Action action ) : void
action System.Action The action.
Résultat void

Enqueue() public méthode

Add a new work item to the container to schedule it for invocation.
public Enqueue ( WorkItem item ) : void
item WorkItem New test work item to enqueue.
Résultat void

EnqueueQuick() public méthode

Enqueues a callback or action that will quickly execute.
public EnqueueQuick ( System.Action action ) : void
action System.Action The action or method.
Résultat void

EnqueueQuick() public méthode

Adds a new work item that will execute more quickly.
public EnqueueQuick ( WorkItem item ) : void
item WorkItem The item of work.
Résultat void

FirstInvoke() protected méthode

Optional method to call on the first invoke.
protected FirstInvoke ( ) : void
Résultat void

Invoke() public méthode

Invoke the test container; in turn will execute child work items as needed. Supports executing multiple items immediately for performance reasons.
public Invoke ( ) : bool
Résultat bool

OnComplete() protected méthode

Fire the Complete event.
protected OnComplete ( EventArgs e ) : void
e System.EventArgs Empty event arguments.
Résultat void

OnUnhandledException() protected méthode

Fire the unhandled exception event.
protected OnUnhandledException ( Exception exception ) : void
exception System.Exception Exception object.
Résultat void

Peek() public méthode

Return the top work item, if any, from this container.
public Peek ( ) : WorkItem
Résultat WorkItem

WorkItemComplete() protected méthode

Work items must call this method to indicate completion of the work item; in turn fires the Complete event delegates.
protected WorkItemComplete ( ) : void
Résultat void