// // Copyright (C) Microsoft. All rights reserved. // using Microsoft.PowerShell.Activities; using System.Management.Automation; using System.Activities; using System.Collections.Generic; using System.ComponentModel; namespace Microsoft.PowerShell.Core.Activities { /// /// Activity to invoke the Microsoft.PowerShell.Core\New-ModuleManifest command in a Workflow. /// [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] public sealed class NewModuleManifest : PSRemotingActivity { /// /// Gets the display name of the command invoked by this activity. /// public NewModuleManifest() { this.DisplayName = "New-ModuleManifest"; } /// /// Gets the fully qualified name of the command invoked by this activity. /// public override string PSCommandName { get { return "Microsoft.PowerShell.Core\\New-ModuleManifest"; } } // Arguments /// /// Provides access to the Path parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument Path { get; set; } /// /// Provides access to the NestedModules parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument NestedModules { get; set; } /// /// Provides access to the Guid parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument Guid { get; set; } /// /// Provides access to the Author parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument Author { get; set; } /// /// Provides access to the CompanyName parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument CompanyName { get; set; } /// /// Provides access to the Copyright parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument Copyright { get; set; } /// /// Provides access to the RootModule parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument RootModule { get; set; } /// /// Provides access to the ModuleVersion parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument ModuleVersion { get; set; } /// /// Provides access to the Description parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument Description { get; set; } /// /// Provides access to the ProcessorArchitecture parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument ProcessorArchitecture { get; set; } /// /// Provides access to the PowerShellVersion parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument PowerShellVersion { get; set; } /// /// Provides access to the ClrVersion parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument ClrVersion { get; set; } /// /// Provides access to the DotNetFrameworkVersion parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument DotNetFrameworkVersion { get; set; } /// /// Provides access to the PowerShellHostName parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument PowerShellHostName { get; set; } /// /// Provides access to the PowerShellHostVersion parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument PowerShellHostVersion { get; set; } /// /// Provides access to the RequiredModules parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument RequiredModules { get; set; } /// /// Provides access to the TypesToProcess parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument TypesToProcess { get; set; } /// /// Provides access to the FormatsToProcess parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument FormatsToProcess { get; set; } /// /// Provides access to the ScriptsToProcess parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument ScriptsToProcess { get; set; } /// /// Provides access to the RequiredAssemblies parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument RequiredAssemblies { get; set; } /// /// Provides access to the FileList parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument FileList { get; set; } /// /// Provides access to the ModuleList parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument ModuleList { get; set; } /// /// Provides access to the FunctionsToExport parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument FunctionsToExport { get; set; } /// /// Provides access to the AliasesToExport parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument AliasesToExport { get; set; } /// /// Provides access to the VariablesToExport parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument VariablesToExport { get; set; } /// /// Provides access to the CmdletsToExport parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument CmdletsToExport { get; set; } /// /// Provides access to the DscResourcesToExport parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument DscResourcesToExport { get; set; } /// /// Provides access to the PrivateData parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument PrivateData { get; set; } /// /// Provides access to the Tags parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument Tags { get; set; } /// /// Provides access to the ProjectUri parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument ProjectUri { get; set; } /// /// Provides access to the LicenseUri parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument LicenseUri { get; set; } /// /// Provides access to the IconUri parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument IconUri { get; set; } /// /// Provides access to the ReleaseNotes parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument ReleaseNotes { get; set; } /// /// Provides access to the HelpInfoUri parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument HelpInfoUri { get; set; } /// /// Provides access to the PassThru parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument PassThru { get; set; } /// /// Provides access to the DefaultCommandPrefix parameter. /// [ParameterSpecificCategory] [DefaultValue(null)] public InArgument DefaultCommandPrefix { get; set; } // Module defining this command // Optional custom code for this activity /// /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. /// /// The NativeActivityContext for the currently running activity. /// A populated instance of System.Management.Automation.PowerShell /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context) { System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create(); System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName); // Initialize the arguments if(Path.Expression != null) { targetCommand.AddParameter("Path", Path.Get(context)); } if(NestedModules.Expression != null) { targetCommand.AddParameter("NestedModules", NestedModules.Get(context)); } if(Guid.Expression != null) { targetCommand.AddParameter("Guid", Guid.Get(context)); } if(Author.Expression != null) { targetCommand.AddParameter("Author", Author.Get(context)); } if(CompanyName.Expression != null) { targetCommand.AddParameter("CompanyName", CompanyName.Get(context)); } if(Copyright.Expression != null) { targetCommand.AddParameter("Copyright", Copyright.Get(context)); } if(RootModule.Expression != null) { targetCommand.AddParameter("RootModule", RootModule.Get(context)); } if(ModuleVersion.Expression != null) { targetCommand.AddParameter("ModuleVersion", ModuleVersion.Get(context)); } if(Description.Expression != null) { targetCommand.AddParameter("Description", Description.Get(context)); } if(ProcessorArchitecture.Expression != null) { targetCommand.AddParameter("ProcessorArchitecture", ProcessorArchitecture.Get(context)); } if(PowerShellVersion.Expression != null) { targetCommand.AddParameter("PowerShellVersion", PowerShellVersion.Get(context)); } if(ClrVersion.Expression != null) { targetCommand.AddParameter("ClrVersion", ClrVersion.Get(context)); } if(DotNetFrameworkVersion.Expression != null) { targetCommand.AddParameter("DotNetFrameworkVersion", DotNetFrameworkVersion.Get(context)); } if(PowerShellHostName.Expression != null) { targetCommand.AddParameter("PowerShellHostName", PowerShellHostName.Get(context)); } if(PowerShellHostVersion.Expression != null) { targetCommand.AddParameter("PowerShellHostVersion", PowerShellHostVersion.Get(context)); } if(RequiredModules.Expression != null) { targetCommand.AddParameter("RequiredModules", RequiredModules.Get(context)); } if(TypesToProcess.Expression != null) { targetCommand.AddParameter("TypesToProcess", TypesToProcess.Get(context)); } if(FormatsToProcess.Expression != null) { targetCommand.AddParameter("FormatsToProcess", FormatsToProcess.Get(context)); } if(ScriptsToProcess.Expression != null) { targetCommand.AddParameter("ScriptsToProcess", ScriptsToProcess.Get(context)); } if(RequiredAssemblies.Expression != null) { targetCommand.AddParameter("RequiredAssemblies", RequiredAssemblies.Get(context)); } if(FileList.Expression != null) { targetCommand.AddParameter("FileList", FileList.Get(context)); } if(ModuleList.Expression != null) { targetCommand.AddParameter("ModuleList", ModuleList.Get(context)); } if(FunctionsToExport.Expression != null) { targetCommand.AddParameter("FunctionsToExport", FunctionsToExport.Get(context)); } if(AliasesToExport.Expression != null) { targetCommand.AddParameter("AliasesToExport", AliasesToExport.Get(context)); } if(VariablesToExport.Expression != null) { targetCommand.AddParameter("VariablesToExport", VariablesToExport.Get(context)); } if(CmdletsToExport.Expression != null) { targetCommand.AddParameter("CmdletsToExport", CmdletsToExport.Get(context)); } if(DscResourcesToExport.Expression != null) { targetCommand.AddParameter("DscResourcesToExport", DscResourcesToExport.Get(context)); } if(PrivateData.Expression != null) { targetCommand.AddParameter("PrivateData", PrivateData.Get(context)); } if(Tags.Expression != null) { targetCommand.AddParameter("Tags", Tags.Get(context)); } if(ProjectUri.Expression != null) { targetCommand.AddParameter("ProjectUri", ProjectUri.Get(context)); } if(LicenseUri.Expression != null) { targetCommand.AddParameter("LicenseUri", LicenseUri.Get(context)); } if(IconUri.Expression != null) { targetCommand.AddParameter("IconUri", IconUri.Get(context)); } if(ReleaseNotes.Expression != null) { targetCommand.AddParameter("ReleaseNotes", ReleaseNotes.Get(context)); } if(HelpInfoUri.Expression != null) { targetCommand.AddParameter("HelpInfoUri", HelpInfoUri.Get(context)); } if(PassThru.Expression != null) { targetCommand.AddParameter("PassThru", PassThru.Get(context)); } if(DefaultCommandPrefix.Expression != null) { targetCommand.AddParameter("DefaultCommandPrefix", DefaultCommandPrefix.Get(context)); } return new ActivityImplementationContext() { PowerShellInstance = invoker }; } } }