SyncAction Delegate
Represents a method that is used to run a synchronous task.
Namespace: Microsoft.WindowsServerSolutions.Administration.ObjectModel
Assembly: Microsoft.WindowsServerSolutions.Administration.ObjectModel (in Microsoft.WindowsServerSolutions.Administration.ObjectModel.dll)
Syntax
public delegate object SyncAction()
public delegate Object^ SyncAction()
Public Delegate Function SyncAction As Object
Return Value
Type: System.Object
An implementation-defined object.
Remarks
The object that is returned from this method is associated with the return value of a TaskCompletedEventArgs object.
A synchronous task is created by initializing a SyncUiTask object.
Examples
The following code example shows how to define a SyncUiTask that uses a delegate method to perform an action:
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
Microsoft.WindowsServerSolutions.Administration.ObjectModel Namespace
Return to top