Freigeben über


ActivityGenerator.GenerateFromName Method

Definition

Overloads

GenerateFromName(String, String)

Generate an activity for the named command.

GenerateFromName(String, String, Boolean)

Generate an activity for the named command.

GenerateFromName(String, String)

Generate an activity for the named command.

public:
 static System::String ^ GenerateFromName(System::String ^ command, System::String ^ activityNamespace);
public:
 static Platform::String ^ GenerateFromName(Platform::String ^ command, Platform::String ^ activityNamespace);
 static std::wstring GenerateFromName(std::wstring const & command, std::wstring const & activityNamespace);
public static string GenerateFromName (string command, string activityNamespace);
static member GenerateFromName : string * string -> string
Public Shared Function GenerateFromName (command As String, activityNamespace As String) As String

Parameters

command
String

The command name to generate.

activityNamespace
String

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

Returns

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

Applies to

GenerateFromName(String, String, Boolean)

Generate an activity for the named command.

public:
 static System::String ^ GenerateFromName(System::String ^ command, System::String ^ activityNamespace, bool shouldRunLocally);
public:
 static Platform::String ^ GenerateFromName(Platform::String ^ command, Platform::String ^ activityNamespace, bool shouldRunLocally);
 static std::wstring GenerateFromName(std::wstring const & command, std::wstring const & activityNamespace, bool shouldRunLocally);
public static string GenerateFromName (string command, string activityNamespace, bool shouldRunLocally);
static member GenerateFromName : string * string * bool -> string
Public Shared Function GenerateFromName (command As String, activityNamespace As String, shouldRunLocally As Boolean) As String

Parameters

command
String

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

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

Applies to