Condividi tramite


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.

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

Syntax

public delegate object SyncAction<TBusinessObject>(
    TBusinessObject businessObj
)
generic<typename TBusinessObject>
public delegate Object^ SyncAction(
    TBusinessObject businessObj
)
Public Delegate Function SyncAction(Of TBusinessObject) (
    businessObj As TBusinessObject
) As Object

Parameters

  • businessObj
    Type: TBusinessObject

    A business object that encapsulates information and methods that relate to business data or business functionality.

Return Value

Type: System.Object

An implementation-defined object.

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.

Remarks

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.

Examples

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;
}

See Also

Microsoft.WindowsServerSolutions.Administration.ObjectModel Namespace

Return to top