Partager via


ProcessTask<TBusinessObject> Constructor (String, String, String)

 

Initializes a new instance of the ProcessTask<TBusinessObject> class with the specified display name, file path, and command-line arguments to run the program.

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

Syntax

public ProcessTask(
    string displayName,
    string filePath,
    string commandLineArgs
)
public:
ProcessTask(
    String^ displayName,
    String^ filePath,
    String^ commandLineArgs
)
Public Sub New (
    displayName As String,
    filePath As String,
    commandLineArgs As String
)

Parameters

  • filePath
    Type: System.String

    The path and name of the program that is assigned to the task.

  • commandLineArgs
    Type: System.String

    The command-line arguments for the program.

Exceptions

Exception Condition
ArgumentException

One or more of the parameters are not valid.

ArgumentNullException

One or more of the parameters are null.

Remarks

After a task has been initialized, it must be added to a TaskCollection to be included in the task pane of the Dashboard.

TBusinessObject represents a business object that encapsulates information and methods that relate to business data or business functionality. The information in the business object is exposed as properties.

Examples

The following code example shows how to initialize a ProcessTask<TBusinessObject> with a specified display name, file path, and command-line arguments:

ProcessTask<BusinessObject>(
    "Create New File", 
    @"C:\Windows\notepad.exe", 
    "newfile.txt");

See Also

ProcessTask<TBusinessObject> Overload
ProcessTask<TBusinessObject> Class
Microsoft.WindowsServerSolutions.Administration.ObjectModel Namespace

Return to top