SyncUiTask Constructor (String, SyncAction)
Initializes a new instance of the SyncUiTask 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 action
)
public:
SyncUiTask(
String^ displayName,
SyncAction^ action
)
Public Sub New (
displayName As String,
action As SyncAction
)
Parameters
displayName
Type: System.StringThe display name of the task.
action
Type: Microsoft.WindowsServerSolutions.Administration.ObjectModel.SyncActionA delegate method that provides the action that the task performs.
Remarks
A SyncUiTask object is used to ensure that a task is completed before any other action is performed in the Dashboard.
Examples
The following code example shows how to initialize a SyncUiTask and add the task to a TaskCollection:
TaskCollection tasks = new TaskCollection();
SyncUiTask synctask = new SyncUiTask("Display Message", SyncUiMethod);
tasks.Add(synctask);
private static object SyncUiMethod()
{
MessageBox.Show("This is a sync task");
return null;
}
See Also
SyncUiTask Overload
SyncUiTask Class
Microsoft.WindowsServerSolutions.Administration.ObjectModel Namespace
Return to top