Share via


GroupTaskItem Constructors

Definition

Initializes a new instance of the GroupTaskItem class.

Overloads

GroupTaskItem(String, String, String)

Initializes a new instance of the GroupTaskItem class.

GroupTaskItem(String, String, String, Boolean)

Initializes a new instance of the GroupTaskItem class.

GroupTaskItem(String, String, String)

Initializes a new instance of the GroupTaskItem class.

public:
 GroupTaskItem(System::String ^ memberName, System::String ^ text, System::String ^ category);
public GroupTaskItem (string memberName, string text, string category);
new Microsoft.Web.Management.Client.GroupTaskItem : string * string * string -> Microsoft.Web.Management.Client.GroupTaskItem
Public Sub New (memberName As String, text As String, category As String)

Parameters

memberName
String

The key used internally by other classes to store a property value.

text
String

The name of the task group.

category
String

The category of the task group.

Examples

The following example returns a most recently used (MRU) list based on the connection path type. The example then adds the MRU list to the newly constructed GroupTaskItem object. For more information about the memberName parameter, see the MemberName property.

/// <summary>
/// This method is called to query the list of Task Items that should be displayed in the TaskPanel
/// </summary>
public override ICollection GetTaskItems() {
    List<TaskItem> items = new List<TaskItem>();

    // Get the current connection
    Connection connection = (Connection)_serviceProvider.GetService(typeof(Connection));

    // Keep a different set of tasks depending on the type (Server, Site, Application, etc)
    MRUList<MRUPageInfo> features = _features[(int)connection.ConfigurationPath.PathType];

    if (features.Count > 0) {
        GroupTaskItem group = new GroupTaskItem("MyExpanded", "Recent Tasks", "Task");
        AddFavorites(group.Items, features);

        items.Add(group);
    }

    return items;
} 

Remarks

This constructor sets the IsHeading property to false.

Applies to

GroupTaskItem(String, String, String, Boolean)

Initializes a new instance of the GroupTaskItem class.

public:
 GroupTaskItem(System::String ^ memberName, System::String ^ text, System::String ^ category, bool isHeading);
public GroupTaskItem (string memberName, string text, string category, bool isHeading);
new Microsoft.Web.Management.Client.GroupTaskItem : string * string * string * bool -> Microsoft.Web.Management.Client.GroupTaskItem
Public Sub New (memberName As String, text As String, category As String, isHeading As Boolean)

Parameters

memberName
String

The key used internally by other classes to store a property value.

text
String

The name of the task group.

category
String

The category of the task group.

isHeading
Boolean

A read-only Boolean flag.

Examples

The following example returns a most recently used (MRU) list based on the connection path type. The example then adds the MRU list to the newly constructed GroupTaskItem object.

/// <summary>
/// This method is called to query the list of Task Items that should be displayed in the TaskPanel
/// </summary>
public override ICollection GetTaskItems() {
    List<TaskItem> items = new List<TaskItem>();

    // Get the current connection
    Connection connection = (Connection)_serviceProvider.GetService(typeof(Connection));

    // Keep a different set of tasks depending on the type (Server, Site, Application, etc)
    MRUList<MRUPageInfo> features = _features[(int)connection.ConfigurationPath.PathType];

    if (features.Count > 0) {
        GroupTaskItem group = new GroupTaskItem("MyExpanded", "Recent Tasks", "Task");
        AddFavorites(group.Items, features);

        items.Add(group);
    }

    return items;
} 

Remarks

The isHeading parameter is not used internally; developers can get the value of the isHeading parameter by using the IsHeadingproperty.

Applies to