ActivityGenerator.GenerateFromCommandInfo Method

Definition

Overloads

GenerateFromCommandInfo(CommandInfo, String)

By default, the activity wrapper uses the remoting command base.

GenerateFromCommandInfo(CommandInfo, String, Boolean)

By default, the activity wrapper uses the remoting command base.

GenerateFromCommandInfo(CommandInfo, String, String, String[], String, String)

Generate an activity for the given command.

GenerateFromCommandInfo(CommandInfo, String)

By default, the activity wrapper uses the remoting command base.

public:
 static System::String ^ GenerateFromCommandInfo(System::Management::Automation::CommandInfo ^ command, System::String ^ activityNamespace);
public static string GenerateFromCommandInfo (System.Management.Automation.CommandInfo command, string activityNamespace);
static member GenerateFromCommandInfo : System.Management.Automation.CommandInfo * string -> string
Public Shared Function GenerateFromCommandInfo (command As CommandInfo, activityNamespace As String) As String

Parameters

command
CommandInfo

The command name to generate.

activityNamespace
String

The namespace that will contain the command - for example, Microsoft.PowerShell.Activities.

Returns

Applies to

GenerateFromCommandInfo(CommandInfo, String, Boolean)

By default, the activity wrapper uses the remoting command base.

public:
 static System::String ^ GenerateFromCommandInfo(System::Management::Automation::CommandInfo ^ command, System::String ^ activityNamespace, bool shouldRunLocally);
public static string GenerateFromCommandInfo (System.Management.Automation.CommandInfo command, string activityNamespace, bool shouldRunLocally);
static member GenerateFromCommandInfo : System.Management.Automation.CommandInfo * string * bool -> string
Public Shared Function GenerateFromCommandInfo (command As CommandInfo, activityNamespace As String, shouldRunLocally As Boolean) As String

Parameters

command
CommandInfo

The command name to generate.

activityNamespace
String

The namespace that will contain the command - for example, Microsoft.PowerShell.Activities.

shouldRunLocally
Boolean

True if remoting-related parameters should be suppressed. This should only be specified for commands that offer no value when run on a remote computer.

Returns

Applies to

GenerateFromCommandInfo(CommandInfo, String, String, String[], String, String)

Generate an activity for the given command.

public:
 static System::String ^ GenerateFromCommandInfo(System::Management::Automation::CommandInfo ^ command, System::String ^ activityNamespace, System::String ^ activityBaseClass, cli::array <System::String ^> ^ parametersToExclude, System::String ^ moduleToLoad, System::String ^ moduleDefinitionText);
public static string GenerateFromCommandInfo (System.Management.Automation.CommandInfo command, string activityNamespace, string activityBaseClass, string[] parametersToExclude, string moduleToLoad, string moduleDefinitionText);
static member GenerateFromCommandInfo : System.Management.Automation.CommandInfo * string * string * string[] * string * string -> string
Public Shared Function GenerateFromCommandInfo (command As CommandInfo, activityNamespace As String, activityBaseClass As String, parametersToExclude As String(), moduleToLoad As String, moduleDefinitionText As String) As String

Parameters

command
CommandInfo

The command to use as the basis of the generated activity.

activityNamespace
String

The namespace that will contain the command - for example, Microsoft.PowerShell.Activities.

activityBaseClass
String

The class to use as the base class for this activity

parametersToExclude
String[]

A list of parameters on the command being wrapped that should not be copied to the activity.

moduleToLoad
String

The module that contains the wrapped command

moduleDefinitionText
String

Addition text to inset in the class definition

Returns

A string representing the C# source code of the generated activity.

Applies to