Share via


SecurityAdapter.CreateTasks Method

Initializes a new instance of a SecurityTaskCollection that will be used to provide tasks in the task pane of the Administration Console.

Namespace: Microsoft.EssentialBusinessServer.Console.ObjectModel
Assembly: Microsoft.EssentialBusinessServer.Console.ObjectModel.Security (in microsoft.essentialbusinessserver.console.objectmodel.security.dll)

Usage

Syntax

'Declaration
Protected MustOverride Function CreateTasks As SecurityTaskCollection
protected abstract SecurityTaskCollection CreateTasks ()
protected:
virtual SecurityTaskCollection^ CreateTasks () abstract
protected abstract SecurityTaskCollection CreateTasks ()
protected abstract function CreateTasks () : SecurityTaskCollection

Return Value

An instance of SecurityTaskCollection that contains the tasks, which are associated with the SecurityAdapter.

Example

The following code example shows how to use the CreateTasks method to initialize a SecurityTaskCollection:

public class NetworkSecurityAdapter : SecurityAdapter
{
    public NetworkSecurityAdapter()
        : base("Network Security Adapter", 
               "Network Adapter for the security tab", 
                WellknownSecurityCategory.NetworkProtection, 
                Resource.Network)
    {
    }

    protected override SecurityTaskCollection CreateTasks()
    {
        SecurityTaskCollection taskCollection = null;
        taskCollection = new SecurityTaskCollection();

        SelectionTask<SecurityAdapter> task = null;
        task = new ProcessTask<SecurityAdapter>(
            "Editor", @"c:\windows\notepad.exe");
        task.Description = "Description";

        taskCollection.Add(task);

        return taskCollection;
    }

}

Remarks

This method must be overridden in a user-defined class.

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.

Platforms

Development Platforms

Windows Server 2008 64-bit Edition, Windows Vista 64-bit Edition, Windows Essential Business Server 2008 Standard, Windows Essential Business Server 2008 Premium

Target Platforms

Windows Essential Business Server 2008 Standard, Windows Essential Business Server 2008 Premium

See Also

Reference

SecurityAdapter Class
SecurityAdapter Members
Microsoft.EssentialBusinessServer.Console.ObjectModel Namespace
SelectionTask
ProcessTask Generic Class