Share via


SyncUiTask<TBusinessObject> Constructor (String, SyncAction<TBusinessObject>)

 

Initializes a new instance of the SyncUiTask<TBusinessObject> class with the specified display name and the specified delegate method that performs the action for the task.

Namespace:   Microsoft.WindowsServerSolutions.Administration.ObjectModel
Assembly:  Microsoft.WindowsServerSolutions.Administration.ObjectModel (in Microsoft.WindowsServerSolutions.Administration.ObjectModel.dll)

Syntax

public SyncUiTask(
    string displayName,
    SyncAction<TBusinessObject> action
)
public:
SyncUiTask(
    String^ displayName,
    SyncAction<TBusinessObject>^ action
)
Public Sub New (
    displayName As String,
    action As SyncAction(Of TBusinessObject)
)

Parameters

Remarks

A SyncUiTask<TBusinessObject> object is used to ensure that a task is completed before any other action is performed in the Dashboard.

TBusinessObject represents a business object that encapsulates information and methods that relate to business data or business functionality. The information in a business object is exposed as properties.

Examples

The following code example shows how to initialize a SyncUiTask<TBusinessObject> and add the task to a TaskCollection:

TaskCollection tasks = new TaskCollection();
SyncUiTask<BusinessObject> syncTask = null;
syncTask = new SyncUiTask<BusinessObject>(
    "Display Message", 
    delegate(BusinessObject businessObj)
    {
        MessageBox.Show("This is a sync task");
        return null;
    });
tasks.Add(syncTask);

See Also

SyncUiTask<TBusinessObject> Class
Microsoft.WindowsServerSolutions.Administration.ObjectModel Namespace

Return to top