SyncAction<TBusinessObject> Delegate
Represents a method that is used to run a synchronous task, which is associated to a business object that has been selected in the Dashboard.
Assembly: Microsoft.WindowsServerSolutions.Administration.ObjectModel (in Microsoft.WindowsServerSolutions.Administration.ObjectModel.dll)
generic<typename TBusinessObject> public delegate Object^ SyncAction( TBusinessObject businessObj )
Parameters
- businessObj
-
Type:
TBusinessObject
A business object that encapsulates information and methods that relate to business data or business functionality.
Type Parameters
- 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.
The object that is returned from this method is associated with the return value of a TaskCompletedEventArgs object.
A synchronous task that is associated to a business object is created by initializing a SyncUiTask<TBusinessObject> object.
The following code example shows how to define a SyncUiTask<TBusinessObject> that uses a delegate method to update data from a business object:
SyncUiTask<BusinessObject> syncTask = null;
syncTask = new SyncUiTask<BusinessObject>("Update Property", UpdateProperty);
tasks.Add(syncTask);
private static object UpdateProperty(BusinessObject businessObj)
{
businessObj.OSVersion = "Windows Vista " +
DateTime.Now.TimeOfDay.ToString();
return businessObj;
}