TaskList Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a container class for methods, messages, and properties for use by the IIS Manager extensibility API.
public ref class TaskList abstract
public abstract class TaskList
type TaskList = class
Public MustInherit Class TaskList
- Inheritance
-
TaskList
Examples
The following example creates a TaskList object and populates it with methods can be called from the Nodes shortcut menu in IIS Manager.
private sealed class HierarchyDemoInfoTaskList : TaskList
{
private DemoHierarchyInfo _owner;
private bool _dirtyState = false;
Person _curPerson = new Person(23, "Albert", "Smith");
public HierarchyDemoInfoTaskList(DemoHierarchyInfo owner) {
_owner = owner;
}
public void Delete()
{
_owner.Delete();
}
/// GetTaskItems() is called every time the context menu is invoked.
public override System.Collections.ICollection GetTaskItems() {
ArrayList items = new ArrayList();
Image imgAsk = rLoadImg.loadImgs(SystemIcons.Asterisk, 16);
Image imgErr = rLoadImg.loadImgs(SystemIcons.Error, 16);
items.Add(new MethodTaskItem(
"DisplayTime", // Method Name
"Show Time", // Menu item Text
"DemoCategory") // Category
);
Person prs = new Person(66, "Joe", "Smith");
MethodTaskItem mti_i = new MethodTaskItem(
"InvTst", // Method Name
"Invoke Test", // Menu item Text
sDemoCat, // Category
"Tool Tip:SC", // ToolTip non-functional
imgAsk, // Menu Icon
prs); // user data
mti_i.CausesNavigation = false;
traceMTI(mti_i);
items.Add(mti_i);
items.Add(new MethodTaskItem(
"ShowCnt", // Method Name
"Show Count", // Menu item Text
sDemoCat, // Category
"Tool Tip:SC", // ToolTip non-functional
mti_i.Image) // Menu Icon
);
foreach (TaskItem item in items)
{
if (item is MethodTaskItem)
item.Enabled = true;
}
return items;
}
Remarks
The TaskList class is used by many classes and methods in the IIS Manager extensibility API. The HierarchyInfo, Module, and ModulePropertiesPage classes all use TaskList by including the virtual method Tasks
.
Notes to Implementers
When you inherit from TaskList, you must override the following members: IsDirty and GetTaskItems().
Constructors
TaskList() |
Initializes a new instance of the TaskList class. |
Properties
IsDirty |
Methods
GetPropertyValue(String) |
This method is not supported. |
GetTaskItems() |
When overridden in a derived class, returns a collection of MethodTaskItem objects. |
InvokeMethod(String, Object) |
Calls the specified method. |
SetPropertyValue(String, Object) |
This method is not supported. |