GroupTaskItem Class
TOC
Collapse the table of content
Expand the table of content

GroupTaskItem Class

IIS 7.0

Provides a container class for group tasks.

System..::..Object
  Microsoft.Web.Management.Client..::..TaskItem
    Microsoft.Web.Management.Client..::..GroupTaskItem

Namespace:  Microsoft.Web.Management.Client
Assembly:  Microsoft.Web.Management (in Microsoft.Web.Management.dll)

[SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
public sealed class GroupTaskItem : TaskItem

The GroupTaskItem type exposes the following members.

  NameDescription
Public methodGroupTaskItem(String, String, String)Initializes a new instance of the GroupTaskItem class.
Public methodGroupTaskItem(String, String, String, Boolean)Initializes a new instance of the GroupTaskItem class.
Top

  NameDescription
Public propertyCategoryGets the category. (Inherited from TaskItem.)
Public propertyDescriptionGets the description that is set in the TaskList constructor. (Inherited from TaskItem.)
Public propertyEnabledGets or sets a value indicating whether the object is enabled. (Inherited from TaskItem.)
Public propertyIsHeadingGets the value of the Boolean isHeading parameter that is passed to the constructor.
Public propertyItemsGets the list of task items.
Public propertyMemberNameGets the member name.
Public propertyPropertiesGets the System.Collections..::..IDictionary member of the class. (Inherited from TaskItem.)
Public propertyTextGets the text that is set in the TaskList constructor. (Inherited from TaskItem.)
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top

The collection of task items will be displayed as a collapsible node in the Actions pane.

The following example returns a most recently used (MRU) list based on the connection path type.

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


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

Community Additions

ADD
Show:
© 2016 Microsoft