Compartilhar via


TaskCondition<TBusinessObject> Class

 

Used to associate a task to a business object that has been selected in the list pane of the Dashboard.

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

Inheritance Hierarchy

System.Object
  Microsoft.WindowsServerSolutions.Administration.ObjectModel.TaskCondition<TBusinessObject>

Syntax

public static class TaskCondition<TBusinessObject>
generic<typename TBusinessObject>
public ref class TaskCondition abstract sealed 
Public NotInheritable Class TaskCondition(Of TBusinessObject)

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.

Properties

Name Description
System_CAPS_pubpropertySystem_CAPS_static Default

Gets a ConditionProvider that always returns Default.

System_CAPS_pubpropertySystem_CAPS_static Normal

Gets a ConditionProvider that always returns Normal.

Remarks

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 define a SelectionTask<TBusinessObject> and define a TaskCondition<TBusinessObject> object for the task using a delegate method:

SelectionTask<BusinessObject> task = null;
task = new ProcessTask<BusinessObject>("Selection Task", "notepad.exe");
task.ConditionProvider = ShouldShowTask;

private static TaskCondition ShouldShowTask(BusinessObject businessObj)
{
    return businessObj.OSVersion == "Windows Vista" ?
         TaskCondition.Default : TaskCondition.NotApplicable;
}

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.WindowsServerSolutions.Administration.ObjectModel Namespace

Return to top