AstToXamlConverter.Convert Method

Definition

Overloads

Convert(String, String, InitialSessionState)
Convert(FunctionDefinitionAst, PSModuleInfo, List<String>, Dictionary<String,ParameterAst>, WorkflowInfo[], Dictionary<String,String>, String)

Converts a PowerShell AST into the XAML that represents it, also returning the cmdlet attribute string for the workflow.

Convert(String, String, InitialSessionState)

public:
 static System::String ^ Convert(System::String ^ name, System::String ^ definition, System::Management::Automation::Runspaces::InitialSessionState ^ initialSessionState);
public static string Convert (string name, string definition, System.Management.Automation.Runspaces.InitialSessionState initialSessionState);
static member Convert : string * string * System.Management.Automation.Runspaces.InitialSessionState -> string
Public Shared Function Convert (name As String, definition As String, initialSessionState As InitialSessionState) As String

Parameters

name
String
definition
String
initialSessionState
InitialSessionState

Returns

Applies to

Convert(FunctionDefinitionAst, PSModuleInfo, List<String>, Dictionary<String,ParameterAst>, WorkflowInfo[], Dictionary<String,String>, String)

Converts a PowerShell AST into the XAML that represents it, also returning the cmdlet attribute string for the workflow.

public:
 static System::String ^ Convert(System::Management::Automation::Language::FunctionDefinitionAst ^ ast, System::Management::Automation::PSModuleInfo ^ definingModule, System::Collections::Generic::List<System::String ^> ^ referencedAssemblies, [Runtime::InteropServices::Out] System::Collections::Generic::Dictionary<System::String ^, System::Management::Automation::Language::ParameterAst ^> ^ % parameterValidation, [Runtime::InteropServices::Out] cli::array <System::Management::Automation::WorkflowInfo ^> ^ % nestedWorkflows, [Runtime::InteropServices::Out] System::Collections::Generic::Dictionary<System::String ^, System::String ^> ^ % requiredAssemblies, [Runtime::InteropServices::Out] System::String ^ % workflowAttributes);
public static string Convert (System.Management.Automation.Language.FunctionDefinitionAst ast, System.Management.Automation.PSModuleInfo definingModule, System.Collections.Generic.List<string> referencedAssemblies, out System.Collections.Generic.Dictionary<string,System.Management.Automation.Language.ParameterAst> parameterValidation, out System.Management.Automation.WorkflowInfo[] nestedWorkflows, out System.Collections.Generic.Dictionary<string,string> requiredAssemblies, out string workflowAttributes);
static member Convert : System.Management.Automation.Language.FunctionDefinitionAst * System.Management.Automation.PSModuleInfo * System.Collections.Generic.List<string> * Dictionary * WorkflowInfo[] * Dictionary * string -> string
Public Shared Function Convert (ast As FunctionDefinitionAst, definingModule As PSModuleInfo, referencedAssemblies As List(Of String), ByRef parameterValidation As Dictionary(Of String, ParameterAst), ByRef nestedWorkflows As WorkflowInfo(), ByRef requiredAssemblies As Dictionary(Of String, String), ByRef workflowAttributes As String) As String

Parameters

ast
FunctionDefinitionAst

The PowerShell AST to convert

definingModule
PSModuleInfo

The module that is defining this command (if any)

referencedAssemblies
List<String>

The list of additional assemblies to search for workflow activities.

parameterValidation
Dictionary<String,ParameterAst>

Any parameter validation applied to the parameters in the provided AST.

nestedWorkflows
WorkflowInfo[]

Any nested workflows required by this PowerShell AST.

requiredAssemblies
Dictionary<String,String>

All assemblies, including provided at API or proiveded in workfow definition, required by this PowerShell Workflow.

workflowAttributes
String

The attribute string for the workflow if these is one.

Returns

Applies to