Add source files for Microsoft.PowerShell.Utility.Activities

This commit is contained in:
PowerShell Team
2016-06-21 15:19:34 -07:00
committed by Dongbo Wang
parent 4f2eb80963
commit 0234b9435d
64 changed files with 8022 additions and 0 deletions
@@ -0,0 +1,19 @@
using System.Reflection;
using System.Security.Permissions;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Diagnostics.CodeAnalysis;
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersionAttribute("3.0.0.0")]
[assembly: System.Resources.NeutralResourcesLanguage("en")]
[assembly: System.Runtime.InteropServices.ComVisible(false)]
[assembly: AssemblyConfiguration("")]
[assembly: ReliabilityContractAttribute(Consistency.MayCorruptAppDomain, Cer.MayFail)]
[assembly: AssemblyTitle("Microsoft.PowerShell.Utility.Activities")]
[assembly: AssemblyDescription("Microsoft.PowerShell.Utility.Activities")]
[module: SuppressMessage("Microsoft.Design", "CA1014:MarkAssembliesWithClsCompliant")]
@@ -0,0 +1,190 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Add-Member command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class AddMember : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public AddMember()
{
this.DisplayName = "Add-Member";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Add-Member"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the MemberType parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSMemberTypes> MemberType { get; set; }
/// <summary>
/// Provides access to the Name parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Name { get; set; }
/// <summary>
/// Provides access to the Value parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object> Value { get; set; }
/// <summary>
/// Provides access to the SecondValue parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object> SecondValue { get; set; }
/// <summary>
/// Provides access to the TypeName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> TypeName { get; set; }
/// <summary>
/// Provides access to the Force parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
/// <summary>
/// Provides access to the PassThru parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
/// <summary>
/// Provides access to the NotePropertyName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> NotePropertyName { get; set; }
/// <summary>
/// Provides access to the NotePropertyValue parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object> NotePropertyValue { get; set; }
/// <summary>
/// Provides access to the NotePropertyMembers parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.IDictionary> NotePropertyMembers { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(MemberType.Expression != null)
{
targetCommand.AddParameter("MemberType", MemberType.Get(context));
}
if(Name.Expression != null)
{
targetCommand.AddParameter("Name", Name.Get(context));
}
if(Value.Expression != null)
{
targetCommand.AddParameter("Value", Value.Get(context));
}
if(SecondValue.Expression != null)
{
targetCommand.AddParameter("SecondValue", SecondValue.Get(context));
}
if(TypeName.Expression != null)
{
targetCommand.AddParameter("TypeName", TypeName.Get(context));
}
if(Force.Expression != null)
{
targetCommand.AddParameter("Force", Force.Get(context));
}
if(PassThru.Expression != null)
{
targetCommand.AddParameter("PassThru", PassThru.Get(context));
}
if(NotePropertyName.Expression != null)
{
targetCommand.AddParameter("NotePropertyName", NotePropertyName.Get(context));
}
if(NotePropertyValue.Expression != null)
{
targetCommand.AddParameter("NotePropertyValue", NotePropertyValue.Get(context));
}
if(NotePropertyMembers.Expression != null)
{
targetCommand.AddParameter("NotePropertyMembers", NotePropertyMembers.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,250 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Add-Type command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class AddType : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public AddType()
{
this.DisplayName = "Add-Type";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Add-Type"; } }
// Arguments
/// <summary>
/// Provides access to the CodeDomProvider parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.CodeDom.Compiler.CodeDomProvider> CodeDomProvider { get; set; }
/// <summary>
/// Provides access to the CompilerParameters parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.CodeDom.Compiler.CompilerParameters> CompilerParameters { get; set; }
/// <summary>
/// Provides access to the TypeDefinition parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> TypeDefinition { get; set; }
/// <summary>
/// Provides access to the Name parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Name { get; set; }
/// <summary>
/// Provides access to the MemberDefinition parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> MemberDefinition { get; set; }
/// <summary>
/// Provides access to the Namespace parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Namespace { get; set; }
/// <summary>
/// Provides access to the UsingNamespace parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> UsingNamespace { get; set; }
/// <summary>
/// Provides access to the Path parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Path { get; set; }
/// <summary>
/// Provides access to the LiteralPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> LiteralPath { get; set; }
/// <summary>
/// Provides access to the AssemblyName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> AssemblyName { get; set; }
/// <summary>
/// Provides access to the Language parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.PowerShell.Commands.Language> Language { get; set; }
/// <summary>
/// Provides access to the ReferencedAssemblies parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> ReferencedAssemblies { get; set; }
/// <summary>
/// Provides access to the OutputAssembly parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> OutputAssembly { get; set; }
/// <summary>
/// Provides access to the OutputType parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.PowerShell.Commands.OutputAssemblyType> OutputType { get; set; }
/// <summary>
/// Provides access to the PassThru parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
/// <summary>
/// Provides access to the IgnoreWarnings parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> IgnoreWarnings { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(CodeDomProvider.Expression != null)
{
targetCommand.AddParameter("CodeDomProvider", CodeDomProvider.Get(context));
}
if(CompilerParameters.Expression != null)
{
targetCommand.AddParameter("CompilerParameters", CompilerParameters.Get(context));
}
if(TypeDefinition.Expression != null)
{
targetCommand.AddParameter("TypeDefinition", TypeDefinition.Get(context));
}
if(Name.Expression != null)
{
targetCommand.AddParameter("Name", Name.Get(context));
}
if(MemberDefinition.Expression != null)
{
targetCommand.AddParameter("MemberDefinition", MemberDefinition.Get(context));
}
if(Namespace.Expression != null)
{
targetCommand.AddParameter("Namespace", Namespace.Get(context));
}
if(UsingNamespace.Expression != null)
{
targetCommand.AddParameter("UsingNamespace", UsingNamespace.Get(context));
}
if(Path.Expression != null)
{
targetCommand.AddParameter("Path", Path.Get(context));
}
if(LiteralPath.Expression != null)
{
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
}
if(AssemblyName.Expression != null)
{
targetCommand.AddParameter("AssemblyName", AssemblyName.Get(context));
}
if(Language.Expression != null)
{
targetCommand.AddParameter("Language", Language.Get(context));
}
if(ReferencedAssemblies.Expression != null)
{
targetCommand.AddParameter("ReferencedAssemblies", ReferencedAssemblies.Get(context));
}
if(OutputAssembly.Expression != null)
{
targetCommand.AddParameter("OutputAssembly", OutputAssembly.Get(context));
}
if(OutputType.Expression != null)
{
targetCommand.AddParameter("OutputType", OutputType.Get(context));
}
if(PassThru.Expression != null)
{
targetCommand.AddParameter("PassThru", PassThru.Get(context));
}
if(IgnoreWarnings.Expression != null)
{
targetCommand.AddParameter("IgnoreWarnings", IgnoreWarnings.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,166 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Compare-Object command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class CompareObject : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public CompareObject()
{
this.DisplayName = "Compare-Object";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Compare-Object"; } }
// Arguments
/// <summary>
/// Provides access to the ReferenceObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject[]> ReferenceObject { get; set; }
/// <summary>
/// Provides access to the DifferenceObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject[]> DifferenceObject { get; set; }
/// <summary>
/// Provides access to the SyncWindow parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> SyncWindow { get; set; }
/// <summary>
/// Provides access to the Property parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object[]> Property { get; set; }
/// <summary>
/// Provides access to the ExcludeDifferent parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> ExcludeDifferent { get; set; }
/// <summary>
/// Provides access to the IncludeEqual parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> IncludeEqual { get; set; }
/// <summary>
/// Provides access to the PassThru parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
/// <summary>
/// Provides access to the Culture parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Culture { get; set; }
/// <summary>
/// Provides access to the CaseSensitive parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> CaseSensitive { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(ReferenceObject.Expression != null)
{
targetCommand.AddParameter("ReferenceObject", ReferenceObject.Get(context));
}
if(DifferenceObject.Expression != null)
{
targetCommand.AddParameter("DifferenceObject", DifferenceObject.Get(context));
}
if(SyncWindow.Expression != null)
{
targetCommand.AddParameter("SyncWindow", SyncWindow.Get(context));
}
if(Property.Expression != null)
{
targetCommand.AddParameter("Property", Property.Get(context));
}
if(ExcludeDifferent.Expression != null)
{
targetCommand.AddParameter("ExcludeDifferent", ExcludeDifferent.Get(context));
}
if(IncludeEqual.Expression != null)
{
targetCommand.AddParameter("IncludeEqual", IncludeEqual.Get(context));
}
if(PassThru.Expression != null)
{
targetCommand.AddParameter("PassThru", PassThru.Get(context));
}
if(Culture.Expression != null)
{
targetCommand.AddParameter("Culture", Culture.Get(context));
}
if(CaseSensitive.Expression != null)
{
targetCommand.AddParameter("CaseSensitive", CaseSensitive.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,106 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\ConvertFrom-Csv command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ConvertFromCsv : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ConvertFromCsv()
{
this.DisplayName = "ConvertFrom-Csv";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\ConvertFrom-Csv"; } }
// Arguments
/// <summary>
/// Provides access to the Delimiter parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Char> Delimiter { get; set; }
/// <summary>
/// Provides access to the UseCulture parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseCulture { get; set; }
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject[]> InputObject { get; set; }
/// <summary>
/// Provides access to the Header parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Header { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Delimiter.Expression != null)
{
targetCommand.AddParameter("Delimiter", Delimiter.Get(context));
}
if(UseCulture.Expression != null)
{
targetCommand.AddParameter("UseCulture", UseCulture.Get(context));
}
if(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Header.Expression != null)
{
targetCommand.AddParameter("Header", Header.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,70 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\ConvertFrom-Json command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ConvertFromJson : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ConvertFromJson()
{
this.DisplayName = "ConvertFrom-Json";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\ConvertFrom-Json"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> InputObject { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,142 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\ConvertFrom-String command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ConvertFromString : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ConvertFromString()
{
this.DisplayName = "ConvertFrom-String";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\ConvertFrom-String"; } }
// Arguments
/// <summary>
/// Provides access to the Delimiter parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Delimiter { get; set; }
/// <summary>
/// Provides access to the PropertyNames parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> PropertyNames { get; set; }
/// <summary>
/// Provides access to the TemplateFile parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> TemplateFile { get; set; }
/// <summary>
/// Provides access to the TemplateContent parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> TemplateContent { get; set; }
/// <summary>
/// Provides access to the IncludeExtent parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> IncludeExtent { get; set; }
/// <summary>
/// Provides access to the UpdateTemplate parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UpdateTemplate { get; set; }
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> InputObject { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Delimiter.Expression != null)
{
targetCommand.AddParameter("Delimiter", Delimiter.Get(context));
}
if(PropertyNames.Expression != null)
{
targetCommand.AddParameter("PropertyNames", PropertyNames.Get(context));
}
if(TemplateFile.Expression != null)
{
targetCommand.AddParameter("TemplateFile", TemplateFile.Get(context));
}
if(TemplateContent.Expression != null)
{
targetCommand.AddParameter("TemplateContent", TemplateContent.Get(context));
}
if(IncludeExtent.Expression != null)
{
targetCommand.AddParameter("IncludeExtent", IncludeExtent.Get(context));
}
if(UpdateTemplate.Expression != null)
{
targetCommand.AddParameter("UpdateTemplate", UpdateTemplate.Get(context));
}
if(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,70 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\ConvertFrom-StringData command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ConvertFromStringData : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ConvertFromStringData()
{
this.DisplayName = "ConvertFrom-StringData";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\ConvertFrom-StringData"; } }
// Arguments
/// <summary>
/// Provides access to the StringData parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> StringData { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(StringData.Expression != null)
{
targetCommand.AddParameter("StringData", StringData.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,106 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\ConvertTo-Csv command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ConvertToCsv : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ConvertToCsv()
{
this.DisplayName = "ConvertTo-Csv";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\ConvertTo-Csv"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Delimiter parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Char> Delimiter { get; set; }
/// <summary>
/// Provides access to the UseCulture parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseCulture { get; set; }
/// <summary>
/// Provides access to the NoTypeInformation parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NoTypeInformation { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Delimiter.Expression != null)
{
targetCommand.AddParameter("Delimiter", Delimiter.Get(context));
}
if(UseCulture.Expression != null)
{
targetCommand.AddParameter("UseCulture", UseCulture.Get(context));
}
if(NoTypeInformation.Expression != null)
{
targetCommand.AddParameter("NoTypeInformation", NoTypeInformation.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,178 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\ConvertTo-Html command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ConvertToHtml : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ConvertToHtml()
{
this.DisplayName = "ConvertTo-Html";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\ConvertTo-Html"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Property parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object[]> Property { get; set; }
/// <summary>
/// Provides access to the Body parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Body { get; set; }
/// <summary>
/// Provides access to the Head parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Head { get; set; }
/// <summary>
/// Provides access to the Title parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Title { get; set; }
/// <summary>
/// Provides access to the As parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> As { get; set; }
/// <summary>
/// Provides access to the CssUri parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> CssUri { get; set; }
/// <summary>
/// Provides access to the Fragment parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Fragment { get; set; }
/// <summary>
/// Provides access to the PostContent parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> PostContent { get; set; }
/// <summary>
/// Provides access to the PreContent parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> PreContent { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Property.Expression != null)
{
targetCommand.AddParameter("Property", Property.Get(context));
}
if(Body.Expression != null)
{
targetCommand.AddParameter("Body", Body.Get(context));
}
if(Head.Expression != null)
{
targetCommand.AddParameter("Head", Head.Get(context));
}
if(Title.Expression != null)
{
targetCommand.AddParameter("Title", Title.Get(context));
}
if(As.Expression != null)
{
targetCommand.AddParameter("As", As.Get(context));
}
if(CssUri.Expression != null)
{
targetCommand.AddParameter("CssUri", CssUri.Get(context));
}
if(Fragment.Expression != null)
{
targetCommand.AddParameter("Fragment", Fragment.Get(context));
}
if(PostContent.Expression != null)
{
targetCommand.AddParameter("PostContent", PostContent.Get(context));
}
if(PreContent.Expression != null)
{
targetCommand.AddParameter("PreContent", PreContent.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,94 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\ConvertTo-Json command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ConvertToJson : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ConvertToJson()
{
this.DisplayName = "ConvertTo-Json";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\ConvertTo-Json"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object> InputObject { get; set; }
/// <summary>
/// Provides access to the Depth parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Depth { get; set; }
/// <summary>
/// Provides access to the Compress parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Compress { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Depth.Expression != null)
{
targetCommand.AddParameter("Depth", Depth.Get(context));
}
if(Compress.Expression != null)
{
targetCommand.AddParameter("Compress", Compress.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,106 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\ConvertTo-Xml command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ConvertToXml : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ConvertToXml()
{
this.DisplayName = "ConvertTo-Xml";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\ConvertTo-Xml"; } }
// Arguments
/// <summary>
/// Provides access to the Depth parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Depth { get; set; }
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the NoTypeInformation parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NoTypeInformation { get; set; }
/// <summary>
/// Provides access to the As parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> As { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Depth.Expression != null)
{
targetCommand.AddParameter("Depth", Depth.Get(context));
}
if(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(NoTypeInformation.Expression != null)
{
targetCommand.AddParameter("NoTypeInformation", NoTypeInformation.Get(context));
}
if(As.Expression != null)
{
targetCommand.AddParameter("As", As.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,142 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Export-Clixml command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ExportClixml : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ExportClixml()
{
this.DisplayName = "Export-Clixml";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Export-Clixml"; } }
// Arguments
/// <summary>
/// Provides access to the Depth parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Depth { get; set; }
/// <summary>
/// Provides access to the Path parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Path { get; set; }
/// <summary>
/// Provides access to the LiteralPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> LiteralPath { get; set; }
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Force parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
/// <summary>
/// Provides access to the NoClobber parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NoClobber { get; set; }
/// <summary>
/// Provides access to the Encoding parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Encoding { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Depth.Expression != null)
{
targetCommand.AddParameter("Depth", Depth.Get(context));
}
if(Path.Expression != null)
{
targetCommand.AddParameter("Path", Path.Get(context));
}
if(LiteralPath.Expression != null)
{
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
}
if(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Force.Expression != null)
{
targetCommand.AddParameter("Force", Force.Get(context));
}
if(NoClobber.Expression != null)
{
targetCommand.AddParameter("NoClobber", NoClobber.Get(context));
}
if(Encoding.Expression != null)
{
targetCommand.AddParameter("Encoding", Encoding.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,178 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Export-Csv command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ExportCsv : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ExportCsv()
{
this.DisplayName = "Export-Csv";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Export-Csv"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Path parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Path { get; set; }
/// <summary>
/// Provides access to the LiteralPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> LiteralPath { get; set; }
/// <summary>
/// Provides access to the Force parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
/// <summary>
/// Provides access to the NoClobber parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NoClobber { get; set; }
/// <summary>
/// Provides access to the Encoding parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Encoding { get; set; }
/// <summary>
/// Provides access to the Append parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Append { get; set; }
/// <summary>
/// Provides access to the Delimiter parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Char> Delimiter { get; set; }
/// <summary>
/// Provides access to the UseCulture parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseCulture { get; set; }
/// <summary>
/// Provides access to the NoTypeInformation parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NoTypeInformation { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Path.Expression != null)
{
targetCommand.AddParameter("Path", Path.Get(context));
}
if(LiteralPath.Expression != null)
{
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
}
if(Force.Expression != null)
{
targetCommand.AddParameter("Force", Force.Get(context));
}
if(NoClobber.Expression != null)
{
targetCommand.AddParameter("NoClobber", NoClobber.Get(context));
}
if(Encoding.Expression != null)
{
targetCommand.AddParameter("Encoding", Encoding.Get(context));
}
if(Append.Expression != null)
{
targetCommand.AddParameter("Append", Append.Get(context));
}
if(Delimiter.Expression != null)
{
targetCommand.AddParameter("Delimiter", Delimiter.Get(context));
}
if(UseCulture.Expression != null)
{
targetCommand.AddParameter("UseCulture", UseCulture.Get(context));
}
if(NoTypeInformation.Expression != null)
{
targetCommand.AddParameter("NoTypeInformation", NoTypeInformation.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,130 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Export-FormatData command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ExportFormatData : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ExportFormatData()
{
this.DisplayName = "Export-FormatData";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Export-FormatData"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.ExtendedTypeDefinition[]> InputObject { get; set; }
/// <summary>
/// Provides access to the Path parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Path { get; set; }
/// <summary>
/// Provides access to the LiteralPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> LiteralPath { get; set; }
/// <summary>
/// Provides access to the Force parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
/// <summary>
/// Provides access to the NoClobber parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NoClobber { get; set; }
/// <summary>
/// Provides access to the IncludeScriptBlock parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> IncludeScriptBlock { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Path.Expression != null)
{
targetCommand.AddParameter("Path", Path.Get(context));
}
if(LiteralPath.Expression != null)
{
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
}
if(Force.Expression != null)
{
targetCommand.AddParameter("Force", Force.Get(context));
}
if(NoClobber.Expression != null)
{
targetCommand.AddParameter("NoClobber", NoClobber.Get(context));
}
if(IncludeScriptBlock.Expression != null)
{
targetCommand.AddParameter("IncludeScriptBlock", IncludeScriptBlock.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,58 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Get-Culture command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetCulture : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetCulture()
{
this.DisplayName = "Get-Culture";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Get-Culture"; } }
// Arguments
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,190 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Get-Date command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetDate : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetDate()
{
this.DisplayName = "Get-Date";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Get-Date"; } }
// Arguments
/// <summary>
/// Provides access to the Date parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.DateTime> Date { get; set; }
/// <summary>
/// Provides access to the Year parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Year { get; set; }
/// <summary>
/// Provides access to the Month parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Month { get; set; }
/// <summary>
/// Provides access to the Day parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Day { get; set; }
/// <summary>
/// Provides access to the Hour parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Hour { get; set; }
/// <summary>
/// Provides access to the Minute parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Minute { get; set; }
/// <summary>
/// Provides access to the Second parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Second { get; set; }
/// <summary>
/// Provides access to the Millisecond parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Millisecond { get; set; }
/// <summary>
/// Provides access to the DisplayHint parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.PowerShell.Commands.DisplayHintType> DisplayHint { get; set; }
/// <summary>
/// Provides access to the UFormat parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> UFormat { get; set; }
/// <summary>
/// Provides access to the Format parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Format { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Date.Expression != null)
{
targetCommand.AddParameter("Date", Date.Get(context));
}
if(Year.Expression != null)
{
targetCommand.AddParameter("Year", Year.Get(context));
}
if(Month.Expression != null)
{
targetCommand.AddParameter("Month", Month.Get(context));
}
if(Day.Expression != null)
{
targetCommand.AddParameter("Day", Day.Get(context));
}
if(Hour.Expression != null)
{
targetCommand.AddParameter("Hour", Hour.Get(context));
}
if(Minute.Expression != null)
{
targetCommand.AddParameter("Minute", Minute.Get(context));
}
if(Second.Expression != null)
{
targetCommand.AddParameter("Second", Second.Get(context));
}
if(Millisecond.Expression != null)
{
targetCommand.AddParameter("Millisecond", Millisecond.Get(context));
}
if(DisplayHint.Expression != null)
{
targetCommand.AddParameter("DisplayHint", DisplayHint.Get(context));
}
if(UFormat.Expression != null)
{
targetCommand.AddParameter("UFormat", UFormat.Get(context));
}
if(Format.Expression != null)
{
targetCommand.AddParameter("Format", Format.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,82 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Get-Event command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetEvent : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetEvent()
{
this.DisplayName = "Get-Event";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Get-Event"; } }
// Arguments
/// <summary>
/// Provides access to the SourceIdentifier parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> SourceIdentifier { get; set; }
/// <summary>
/// Provides access to the EventIdentifier parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> EventIdentifier { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(SourceIdentifier.Expression != null)
{
targetCommand.AddParameter("SourceIdentifier", SourceIdentifier.Get(context));
}
if(EventIdentifier.Expression != null)
{
targetCommand.AddParameter("EventIdentifier", EventIdentifier.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,94 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Get-EventSubscriber command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetEventSubscriber : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetEventSubscriber()
{
this.DisplayName = "Get-EventSubscriber";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Get-EventSubscriber"; } }
// Arguments
/// <summary>
/// Provides access to the SourceIdentifier parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> SourceIdentifier { get; set; }
/// <summary>
/// Provides access to the SubscriptionId parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> SubscriptionId { get; set; }
/// <summary>
/// Provides access to the Force parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(SourceIdentifier.Expression != null)
{
targetCommand.AddParameter("SourceIdentifier", SourceIdentifier.Get(context));
}
if(SubscriptionId.Expression != null)
{
targetCommand.AddParameter("SubscriptionId", SubscriptionId.Get(context));
}
if(Force.Expression != null)
{
targetCommand.AddParameter("Force", Force.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,58 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Get-Host command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetHost : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetHost()
{
this.DisplayName = "Get-Host";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Get-Host"; } }
// Arguments
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,130 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Get-Member command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetMember : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetMember()
{
this.DisplayName = "Get-Member";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Get-Member"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Name parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Name { get; set; }
/// <summary>
/// Provides access to the MemberType parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSMemberTypes> MemberType { get; set; }
/// <summary>
/// Provides access to the View parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSMemberViewTypes> View { get; set; }
/// <summary>
/// Provides access to the Static parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Static { get; set; }
/// <summary>
/// Provides access to the Force parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Name.Expression != null)
{
targetCommand.AddParameter("Name", Name.Get(context));
}
if(MemberType.Expression != null)
{
targetCommand.AddParameter("MemberType", MemberType.Get(context));
}
if(View.Expression != null)
{
targetCommand.AddParameter("View", View.Get(context));
}
if(Static.Expression != null)
{
targetCommand.AddParameter("Static", Static.Get(context));
}
if(Force.Expression != null)
{
targetCommand.AddParameter("Force", Force.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,118 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Get-Random command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetRandom : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetRandom()
{
this.DisplayName = "Get-Random";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Get-Random"; } }
// Arguments
/// <summary>
/// Provides access to the SetSeed parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Nullable<System.Int32>> SetSeed { get; set; }
/// <summary>
/// Provides access to the Maximum parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object> Maximum { get; set; }
/// <summary>
/// Provides access to the Minimum parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object> Minimum { get; set; }
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object[]> InputObject { get; set; }
/// <summary>
/// Provides access to the Count parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Count { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(SetSeed.Expression != null)
{
targetCommand.AddParameter("SetSeed", SetSeed.Get(context));
}
if(Maximum.Expression != null)
{
targetCommand.AddParameter("Maximum", Maximum.Get(context));
}
if(Minimum.Expression != null)
{
targetCommand.AddParameter("Minimum", Minimum.Get(context));
}
if(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Count.Expression != null)
{
targetCommand.AddParameter("Count", Count.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,70 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Get-TraceSource command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetTraceSource : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetTraceSource()
{
this.DisplayName = "Get-TraceSource";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Get-TraceSource"; } }
// Arguments
/// <summary>
/// Provides access to the Name parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Name { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Name.Expression != null)
{
targetCommand.AddParameter("Name", Name.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,70 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Get-TypeData command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetTypeData : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetTypeData()
{
this.DisplayName = "Get-TypeData";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Get-TypeData"; } }
// Arguments
/// <summary>
/// Provides access to the TypeName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> TypeName { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(TypeName.Expression != null)
{
targetCommand.AddParameter("TypeName", TypeName.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,58 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Get-UICulture command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetUICulture : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetUICulture()
{
this.DisplayName = "Get-UICulture";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Get-UICulture"; } }
// Arguments
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,94 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Get-Unique command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetUnique : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetUnique()
{
this.DisplayName = "Get-Unique";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Get-Unique"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the AsString parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> AsString { get; set; }
/// <summary>
/// Provides access to the OnType parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> OnType { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(AsString.Expression != null)
{
targetCommand.AddParameter("AsString", AsString.Get(context));
}
if(OnType.Expression != null)
{
targetCommand.AddParameter("OnType", OnType.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,142 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Group-Object command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GroupObject : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GroupObject()
{
this.DisplayName = "Group-Object";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Group-Object"; } }
// Arguments
/// <summary>
/// Provides access to the NoElement parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NoElement { get; set; }
/// <summary>
/// Provides access to the AsHashTable parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> AsHashTable { get; set; }
/// <summary>
/// Provides access to the AsString parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> AsString { get; set; }
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Property parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object[]> Property { get; set; }
/// <summary>
/// Provides access to the Culture parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Culture { get; set; }
/// <summary>
/// Provides access to the CaseSensitive parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> CaseSensitive { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(NoElement.Expression != null)
{
targetCommand.AddParameter("NoElement", NoElement.Get(context));
}
if(AsHashTable.Expression != null)
{
targetCommand.AddParameter("AsHashTable", AsHashTable.Get(context));
}
if(AsString.Expression != null)
{
targetCommand.AddParameter("AsString", AsString.Get(context));
}
if(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Property.Expression != null)
{
targetCommand.AddParameter("Property", Property.Get(context));
}
if(Culture.Expression != null)
{
targetCommand.AddParameter("Culture", Culture.Get(context));
}
if(CaseSensitive.Expression != null)
{
targetCommand.AddParameter("CaseSensitive", CaseSensitive.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,118 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Import-Clixml command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ImportClixml : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ImportClixml()
{
this.DisplayName = "Import-Clixml";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Import-Clixml"; } }
// Arguments
/// <summary>
/// Provides access to the Path parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Path { get; set; }
/// <summary>
/// Provides access to the LiteralPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> LiteralPath { get; set; }
/// <summary>
/// Provides access to the IncludeTotalCount parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> IncludeTotalCount { get; set; }
/// <summary>
/// Provides access to the Skip parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.UInt64> Skip { get; set; }
/// <summary>
/// Provides access to the First parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.UInt64> First { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(LiteralPath.Expression != null)
{
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
}
if(IncludeTotalCount.Expression != null)
{
targetCommand.AddParameter("IncludeTotalCount", IncludeTotalCount.Get(context));
}
if(Skip.Expression != null)
{
targetCommand.AddParameter("Skip", Skip.Get(context));
}
if(First.Expression != null)
{
targetCommand.AddParameter("First", First.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,130 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Import-Csv command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ImportCsv : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ImportCsv()
{
this.DisplayName = "Import-Csv";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Import-Csv"; } }
// Arguments
/// <summary>
/// Provides access to the Delimiter parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Char> Delimiter { get; set; }
/// <summary>
/// Provides access to the Path parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Path { get; set; }
/// <summary>
/// Provides access to the LiteralPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> LiteralPath { get; set; }
/// <summary>
/// Provides access to the UseCulture parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseCulture { get; set; }
/// <summary>
/// Provides access to the Header parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Header { get; set; }
/// <summary>
/// Provides access to the Encoding parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Encoding { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Delimiter.Expression != null)
{
targetCommand.AddParameter("Delimiter", Delimiter.Get(context));
}
if(Path.Expression != null)
{
targetCommand.AddParameter("Path", Path.Get(context));
}
if(LiteralPath.Expression != null)
{
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
}
if(UseCulture.Expression != null)
{
targetCommand.AddParameter("UseCulture", UseCulture.Get(context));
}
if(Header.Expression != null)
{
targetCommand.AddParameter("Header", Header.Get(context));
}
if(Encoding.Expression != null)
{
targetCommand.AddParameter("Encoding", Encoding.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,70 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Invoke-Expression command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class InvokeExpression : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public InvokeExpression()
{
this.DisplayName = "Invoke-Expression";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Invoke-Expression"; } }
// Arguments
/// <summary>
/// Provides access to the Command parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Command { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Command.Expression != null)
{
targetCommand.AddParameter("Command", Command.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,334 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Invoke-RestMethod command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class InvokeRestMethod : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public InvokeRestMethod()
{
this.DisplayName = "Invoke-RestMethod";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Invoke-RestMethod"; } }
// Arguments
/// <summary>
/// Provides access to the Method parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.PowerShell.Commands.WebRequestMethod> Method { get; set; }
/// <summary>
/// Provides access to the UseBasicParsing parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseBasicParsing { get; set; }
/// <summary>
/// Provides access to the Uri parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> Uri { get; set; }
/// <summary>
/// Provides access to the WebSession parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.PowerShell.Commands.WebRequestSession> WebSession { get; set; }
/// <summary>
/// Provides access to the SessionVariable parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> SessionVariable { get; set; }
/// <summary>
/// Provides access to the Credential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
/// <summary>
/// Provides access to the UseDefaultCredentials parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseDefaultCredentials { get; set; }
/// <summary>
/// Provides access to the CertificateThumbprint parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CertificateThumbprint { get; set; }
/// <summary>
/// Provides access to the Certificate parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Security.Cryptography.X509Certificates.X509Certificate> Certificate { get; set; }
/// <summary>
/// Provides access to the UserAgent parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> UserAgent { get; set; }
/// <summary>
/// Provides access to the DisableKeepAlive parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> DisableKeepAlive { get; set; }
/// <summary>
/// Provides access to the TimeoutSec parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> TimeoutSec { get; set; }
/// <summary>
/// Provides access to the Headers parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.IDictionary> Headers { get; set; }
/// <summary>
/// Provides access to the MaximumRedirection parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> MaximumRedirection { get; set; }
/// <summary>
/// Provides access to the Proxy parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> Proxy { get; set; }
/// <summary>
/// Provides access to the ProxyCredential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> ProxyCredential { get; set; }
/// <summary>
/// Provides access to the ProxyUseDefaultCredentials parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> ProxyUseDefaultCredentials { get; set; }
/// <summary>
/// Provides access to the Body parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object> Body { get; set; }
/// <summary>
/// Provides access to the ContentType parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ContentType { get; set; }
/// <summary>
/// Provides access to the TransferEncoding parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> TransferEncoding { get; set; }
/// <summary>
/// Provides access to the InFile parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> InFile { get; set; }
/// <summary>
/// Provides access to the OutFile parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> OutFile { get; set; }
/// <summary>
/// Provides access to the PassThru parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Method.Expression != null)
{
targetCommand.AddParameter("Method", Method.Get(context));
}
if(UseBasicParsing.Expression != null)
{
targetCommand.AddParameter("UseBasicParsing", UseBasicParsing.Get(context));
}
if(Uri.Expression != null)
{
targetCommand.AddParameter("Uri", Uri.Get(context));
}
if(WebSession.Expression != null)
{
targetCommand.AddParameter("WebSession", WebSession.Get(context));
}
if(SessionVariable.Expression != null)
{
targetCommand.AddParameter("SessionVariable", SessionVariable.Get(context));
}
if(Credential.Expression != null)
{
targetCommand.AddParameter("Credential", Credential.Get(context));
}
if(UseDefaultCredentials.Expression != null)
{
targetCommand.AddParameter("UseDefaultCredentials", UseDefaultCredentials.Get(context));
}
if(CertificateThumbprint.Expression != null)
{
targetCommand.AddParameter("CertificateThumbprint", CertificateThumbprint.Get(context));
}
if(Certificate.Expression != null)
{
targetCommand.AddParameter("Certificate", Certificate.Get(context));
}
if(UserAgent.Expression != null)
{
targetCommand.AddParameter("UserAgent", UserAgent.Get(context));
}
if(DisableKeepAlive.Expression != null)
{
targetCommand.AddParameter("DisableKeepAlive", DisableKeepAlive.Get(context));
}
if(TimeoutSec.Expression != null)
{
targetCommand.AddParameter("TimeoutSec", TimeoutSec.Get(context));
}
if(Headers.Expression != null)
{
targetCommand.AddParameter("Headers", Headers.Get(context));
}
if(MaximumRedirection.Expression != null)
{
targetCommand.AddParameter("MaximumRedirection", MaximumRedirection.Get(context));
}
if(Proxy.Expression != null)
{
targetCommand.AddParameter("Proxy", Proxy.Get(context));
}
if(ProxyCredential.Expression != null)
{
targetCommand.AddParameter("ProxyCredential", ProxyCredential.Get(context));
}
if(ProxyUseDefaultCredentials.Expression != null)
{
targetCommand.AddParameter("ProxyUseDefaultCredentials", ProxyUseDefaultCredentials.Get(context));
}
if(Body.Expression != null)
{
targetCommand.AddParameter("Body", Body.Get(context));
}
if(ContentType.Expression != null)
{
targetCommand.AddParameter("ContentType", ContentType.Get(context));
}
if(TransferEncoding.Expression != null)
{
targetCommand.AddParameter("TransferEncoding", TransferEncoding.Get(context));
}
if(InFile.Expression != null)
{
targetCommand.AddParameter("InFile", InFile.Get(context));
}
if(OutFile.Expression != null)
{
targetCommand.AddParameter("OutFile", OutFile.Get(context));
}
if(PassThru.Expression != null)
{
targetCommand.AddParameter("PassThru", PassThru.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,334 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Invoke-WebRequest command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class InvokeWebRequest : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public InvokeWebRequest()
{
this.DisplayName = "Invoke-WebRequest";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Invoke-WebRequest"; } }
// Arguments
/// <summary>
/// Provides access to the UseBasicParsing parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseBasicParsing { get; set; }
/// <summary>
/// Provides access to the Uri parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> Uri { get; set; }
/// <summary>
/// Provides access to the WebSession parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.PowerShell.Commands.WebRequestSession> WebSession { get; set; }
/// <summary>
/// Provides access to the SessionVariable parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> SessionVariable { get; set; }
/// <summary>
/// Provides access to the Credential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
/// <summary>
/// Provides access to the UseDefaultCredentials parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseDefaultCredentials { get; set; }
/// <summary>
/// Provides access to the CertificateThumbprint parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CertificateThumbprint { get; set; }
/// <summary>
/// Provides access to the Certificate parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Security.Cryptography.X509Certificates.X509Certificate> Certificate { get; set; }
/// <summary>
/// Provides access to the UserAgent parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> UserAgent { get; set; }
/// <summary>
/// Provides access to the DisableKeepAlive parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> DisableKeepAlive { get; set; }
/// <summary>
/// Provides access to the TimeoutSec parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> TimeoutSec { get; set; }
/// <summary>
/// Provides access to the Headers parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.IDictionary> Headers { get; set; }
/// <summary>
/// Provides access to the MaximumRedirection parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> MaximumRedirection { get; set; }
/// <summary>
/// Provides access to the Method parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.PowerShell.Commands.WebRequestMethod> Method { get; set; }
/// <summary>
/// Provides access to the Proxy parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> Proxy { get; set; }
/// <summary>
/// Provides access to the ProxyCredential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> ProxyCredential { get; set; }
/// <summary>
/// Provides access to the ProxyUseDefaultCredentials parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> ProxyUseDefaultCredentials { get; set; }
/// <summary>
/// Provides access to the Body parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object> Body { get; set; }
/// <summary>
/// Provides access to the ContentType parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ContentType { get; set; }
/// <summary>
/// Provides access to the TransferEncoding parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> TransferEncoding { get; set; }
/// <summary>
/// Provides access to the InFile parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> InFile { get; set; }
/// <summary>
/// Provides access to the OutFile parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> OutFile { get; set; }
/// <summary>
/// Provides access to the PassThru parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(UseBasicParsing.Expression != null)
{
targetCommand.AddParameter("UseBasicParsing", UseBasicParsing.Get(context));
}
if(Uri.Expression != null)
{
targetCommand.AddParameter("Uri", Uri.Get(context));
}
if(WebSession.Expression != null)
{
targetCommand.AddParameter("WebSession", WebSession.Get(context));
}
if(SessionVariable.Expression != null)
{
targetCommand.AddParameter("SessionVariable", SessionVariable.Get(context));
}
if(Credential.Expression != null)
{
targetCommand.AddParameter("Credential", Credential.Get(context));
}
if(UseDefaultCredentials.Expression != null)
{
targetCommand.AddParameter("UseDefaultCredentials", UseDefaultCredentials.Get(context));
}
if(CertificateThumbprint.Expression != null)
{
targetCommand.AddParameter("CertificateThumbprint", CertificateThumbprint.Get(context));
}
if(Certificate.Expression != null)
{
targetCommand.AddParameter("Certificate", Certificate.Get(context));
}
if(UserAgent.Expression != null)
{
targetCommand.AddParameter("UserAgent", UserAgent.Get(context));
}
if(DisableKeepAlive.Expression != null)
{
targetCommand.AddParameter("DisableKeepAlive", DisableKeepAlive.Get(context));
}
if(TimeoutSec.Expression != null)
{
targetCommand.AddParameter("TimeoutSec", TimeoutSec.Get(context));
}
if(Headers.Expression != null)
{
targetCommand.AddParameter("Headers", Headers.Get(context));
}
if(MaximumRedirection.Expression != null)
{
targetCommand.AddParameter("MaximumRedirection", MaximumRedirection.Get(context));
}
if(Method.Expression != null)
{
targetCommand.AddParameter("Method", Method.Get(context));
}
if(Proxy.Expression != null)
{
targetCommand.AddParameter("Proxy", Proxy.Get(context));
}
if(ProxyCredential.Expression != null)
{
targetCommand.AddParameter("ProxyCredential", ProxyCredential.Get(context));
}
if(ProxyUseDefaultCredentials.Expression != null)
{
targetCommand.AddParameter("ProxyUseDefaultCredentials", ProxyUseDefaultCredentials.Get(context));
}
if(Body.Expression != null)
{
targetCommand.AddParameter("Body", Body.Get(context));
}
if(ContentType.Expression != null)
{
targetCommand.AddParameter("ContentType", ContentType.Get(context));
}
if(TransferEncoding.Expression != null)
{
targetCommand.AddParameter("TransferEncoding", TransferEncoding.Get(context));
}
if(InFile.Expression != null)
{
targetCommand.AddParameter("InFile", InFile.Get(context));
}
if(OutFile.Expression != null)
{
targetCommand.AddParameter("OutFile", OutFile.Get(context));
}
if(PassThru.Expression != null)
{
targetCommand.AddParameter("PassThru", PassThru.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,82 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Measure-Command command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class MeasureCommand : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public MeasureCommand()
{
this.DisplayName = "Measure-Command";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Measure-Command"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Expression parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.ScriptBlock> Expression { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Expression.Expression != null)
{
targetCommand.AddParameter("Expression", Expression.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,178 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Measure-Object command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class MeasureObject : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public MeasureObject()
{
this.DisplayName = "Measure-Object";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Measure-Object"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Property parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Property { get; set; }
/// <summary>
/// Provides access to the Sum parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Sum { get; set; }
/// <summary>
/// Provides access to the Average parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Average { get; set; }
/// <summary>
/// Provides access to the Maximum parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Maximum { get; set; }
/// <summary>
/// Provides access to the Minimum parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Minimum { get; set; }
/// <summary>
/// Provides access to the Line parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Line { get; set; }
/// <summary>
/// Provides access to the Word parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Word { get; set; }
/// <summary>
/// Provides access to the Character parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Character { get; set; }
/// <summary>
/// Provides access to the IgnoreWhiteSpace parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> IgnoreWhiteSpace { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Property.Expression != null)
{
targetCommand.AddParameter("Property", Property.Get(context));
}
if(Sum.Expression != null)
{
targetCommand.AddParameter("Sum", Sum.Get(context));
}
if(Average.Expression != null)
{
targetCommand.AddParameter("Average", Average.Get(context));
}
if(Maximum.Expression != null)
{
targetCommand.AddParameter("Maximum", Maximum.Get(context));
}
if(Minimum.Expression != null)
{
targetCommand.AddParameter("Minimum", Minimum.Get(context));
}
if(Line.Expression != null)
{
targetCommand.AddParameter("Line", Line.Get(context));
}
if(Word.Expression != null)
{
targetCommand.AddParameter("Word", Word.Get(context));
}
if(Character.Expression != null)
{
targetCommand.AddParameter("Character", Character.Get(context));
}
if(IgnoreWhiteSpace.Expression != null)
{
targetCommand.AddParameter("IgnoreWhiteSpace", IgnoreWhiteSpace.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,106 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\New-Event command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class NewEvent : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public NewEvent()
{
this.DisplayName = "New-Event";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\New-Event"; } }
// Arguments
/// <summary>
/// Provides access to the SourceIdentifier parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> SourceIdentifier { get; set; }
/// <summary>
/// Provides access to the Sender parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> Sender { get; set; }
/// <summary>
/// Provides access to the EventArguments parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject[]> EventArguments { get; set; }
/// <summary>
/// Provides access to the MessageData parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> MessageData { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(SourceIdentifier.Expression != null)
{
targetCommand.AddParameter("SourceIdentifier", SourceIdentifier.Get(context));
}
if(Sender.Expression != null)
{
targetCommand.AddParameter("Sender", Sender.Get(context));
}
if(EventArguments.Expression != null)
{
targetCommand.AddParameter("EventArguments", EventArguments.Get(context));
}
if(MessageData.Expression != null)
{
targetCommand.AddParameter("MessageData", MessageData.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,130 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\New-TimeSpan command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class NewTimeSpan : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public NewTimeSpan()
{
this.DisplayName = "New-TimeSpan";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\New-TimeSpan"; } }
// Arguments
/// <summary>
/// Provides access to the Start parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.DateTime> Start { get; set; }
/// <summary>
/// Provides access to the End parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.DateTime> End { get; set; }
/// <summary>
/// Provides access to the Days parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Days { get; set; }
/// <summary>
/// Provides access to the Hours parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Hours { get; set; }
/// <summary>
/// Provides access to the Minutes parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Minutes { get; set; }
/// <summary>
/// Provides access to the Seconds parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Seconds { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Start.Expression != null)
{
targetCommand.AddParameter("Start", Start.Get(context));
}
if(End.Expression != null)
{
targetCommand.AddParameter("End", End.Get(context));
}
if(Days.Expression != null)
{
targetCommand.AddParameter("Days", Days.Get(context));
}
if(Hours.Expression != null)
{
targetCommand.AddParameter("Hours", Hours.Get(context));
}
if(Minutes.Expression != null)
{
targetCommand.AddParameter("Minutes", Minutes.Get(context));
}
if(Seconds.Expression != null)
{
targetCommand.AddParameter("Seconds", Seconds.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,166 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Out-File command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class OutFile : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public OutFile()
{
this.DisplayName = "Out-File";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Out-File"; } }
// Arguments
/// <summary>
/// Provides access to the FilePath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> FilePath { get; set; }
/// <summary>
/// Provides access to the LiteralPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> LiteralPath { get; set; }
/// <summary>
/// Provides access to the Encoding parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Encoding { get; set; }
/// <summary>
/// Provides access to the Append parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Append { get; set; }
/// <summary>
/// Provides access to the Force parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
/// <summary>
/// Provides access to the NoClobber parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NoClobber { get; set; }
/// <summary>
/// Provides access to the Width parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Width { get; set; }
/// <summary>
/// Provides access to the NoNewline parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NoNewline { get; set; }
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(FilePath.Expression != null)
{
targetCommand.AddParameter("FilePath", FilePath.Get(context));
}
if(LiteralPath.Expression != null)
{
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
}
if(Encoding.Expression != null)
{
targetCommand.AddParameter("Encoding", Encoding.Get(context));
}
if(Append.Expression != null)
{
targetCommand.AddParameter("Append", Append.Get(context));
}
if(Force.Expression != null)
{
targetCommand.AddParameter("Force", Force.Get(context));
}
if(NoClobber.Expression != null)
{
targetCommand.AddParameter("NoClobber", NoClobber.Get(context));
}
if(Width.Expression != null)
{
targetCommand.AddParameter("Width", Width.Get(context));
}
if(NoNewline.Expression != null)
{
targetCommand.AddParameter("NoNewline", NoNewline.Get(context));
}
if(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,82 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Out-Printer command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class OutPrinter : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public OutPrinter()
{
this.DisplayName = "Out-Printer";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Out-Printer"; } }
// Arguments
/// <summary>
/// Provides access to the Name parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Name { get; set; }
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Name.Expression != null)
{
targetCommand.AddParameter("Name", Name.Get(context));
}
if(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,94 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Out-String command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class OutString : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public OutString()
{
this.DisplayName = "Out-String";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Out-String"; } }
// Arguments
/// <summary>
/// Provides access to the Stream parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Stream { get; set; }
/// <summary>
/// Provides access to the Width parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Width { get; set; }
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Stream.Expression != null)
{
targetCommand.AddParameter("Stream", Stream.Get(context));
}
if(Width.Expression != null)
{
targetCommand.AddParameter("Width", Width.Get(context));
}
if(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,130 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Register-EngineEvent command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class RegisterEngineEvent : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public RegisterEngineEvent()
{
this.DisplayName = "Register-EngineEvent";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Register-EngineEvent"; } }
// Arguments
/// <summary>
/// Provides access to the SourceIdentifier parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> SourceIdentifier { get; set; }
/// <summary>
/// Provides access to the Action parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.ScriptBlock> Action { get; set; }
/// <summary>
/// Provides access to the MessageData parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> MessageData { get; set; }
/// <summary>
/// Provides access to the SupportEvent parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> SupportEvent { get; set; }
/// <summary>
/// Provides access to the Forward parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Forward { get; set; }
/// <summary>
/// Provides access to the MaxTriggerCount parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> MaxTriggerCount { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(SourceIdentifier.Expression != null)
{
targetCommand.AddParameter("SourceIdentifier", SourceIdentifier.Get(context));
}
if(Action.Expression != null)
{
targetCommand.AddParameter("Action", Action.Get(context));
}
if(MessageData.Expression != null)
{
targetCommand.AddParameter("MessageData", MessageData.Get(context));
}
if(SupportEvent.Expression != null)
{
targetCommand.AddParameter("SupportEvent", SupportEvent.Get(context));
}
if(Forward.Expression != null)
{
targetCommand.AddParameter("Forward", Forward.Get(context));
}
if(MaxTriggerCount.Expression != null)
{
targetCommand.AddParameter("MaxTriggerCount", MaxTriggerCount.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,154 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Register-ObjectEvent command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class RegisterObjectEvent : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public RegisterObjectEvent()
{
this.DisplayName = "Register-ObjectEvent";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Register-ObjectEvent"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the EventName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> EventName { get; set; }
/// <summary>
/// Provides access to the SourceIdentifier parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> SourceIdentifier { get; set; }
/// <summary>
/// Provides access to the Action parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.ScriptBlock> Action { get; set; }
/// <summary>
/// Provides access to the MessageData parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> MessageData { get; set; }
/// <summary>
/// Provides access to the SupportEvent parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> SupportEvent { get; set; }
/// <summary>
/// Provides access to the Forward parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Forward { get; set; }
/// <summary>
/// Provides access to the MaxTriggerCount parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> MaxTriggerCount { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(EventName.Expression != null)
{
targetCommand.AddParameter("EventName", EventName.Get(context));
}
if(SourceIdentifier.Expression != null)
{
targetCommand.AddParameter("SourceIdentifier", SourceIdentifier.Get(context));
}
if(Action.Expression != null)
{
targetCommand.AddParameter("Action", Action.Get(context));
}
if(MessageData.Expression != null)
{
targetCommand.AddParameter("MessageData", MessageData.Get(context));
}
if(SupportEvent.Expression != null)
{
targetCommand.AddParameter("SupportEvent", SupportEvent.Get(context));
}
if(Forward.Expression != null)
{
targetCommand.AddParameter("Forward", Forward.Get(context));
}
if(MaxTriggerCount.Expression != null)
{
targetCommand.AddParameter("MaxTriggerCount", MaxTriggerCount.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,82 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Remove-Event command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class RemoveEvent : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public RemoveEvent()
{
this.DisplayName = "Remove-Event";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Remove-Event"; } }
// Arguments
/// <summary>
/// Provides access to the SourceIdentifier parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> SourceIdentifier { get; set; }
/// <summary>
/// Provides access to the EventIdentifier parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> EventIdentifier { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(SourceIdentifier.Expression != null)
{
targetCommand.AddParameter("SourceIdentifier", SourceIdentifier.Get(context));
}
if(EventIdentifier.Expression != null)
{
targetCommand.AddParameter("EventIdentifier", EventIdentifier.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,190 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Select-Object command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class SelectObject : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public SelectObject()
{
this.DisplayName = "Select-Object";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Select-Object"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Property parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object[]> Property { get; set; }
/// <summary>
/// Provides access to the ExcludeProperty parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> ExcludeProperty { get; set; }
/// <summary>
/// Provides access to the ExpandProperty parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ExpandProperty { get; set; }
/// <summary>
/// Provides access to the Unique parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Unique { get; set; }
/// <summary>
/// Provides access to the Last parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Last { get; set; }
/// <summary>
/// Provides access to the First parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> First { get; set; }
/// <summary>
/// Provides access to the Skip parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Skip { get; set; }
/// <summary>
/// Provides access to the SkipLast parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> SkipLast { get; set; }
/// <summary>
/// Provides access to the Wait parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Wait { get; set; }
/// <summary>
/// Provides access to the Index parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32[]> Index { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Property.Expression != null)
{
targetCommand.AddParameter("Property", Property.Get(context));
}
if(ExcludeProperty.Expression != null)
{
targetCommand.AddParameter("ExcludeProperty", ExcludeProperty.Get(context));
}
if(ExpandProperty.Expression != null)
{
targetCommand.AddParameter("ExpandProperty", ExpandProperty.Get(context));
}
if(Unique.Expression != null)
{
targetCommand.AddParameter("Unique", Unique.Get(context));
}
if(Last.Expression != null)
{
targetCommand.AddParameter("Last", Last.Get(context));
}
if(First.Expression != null)
{
targetCommand.AddParameter("First", First.Get(context));
}
if(Skip.Expression != null)
{
targetCommand.AddParameter("Skip", Skip.Get(context));
}
if(SkipLast.Expression != null)
{
targetCommand.AddParameter("SkipLast", SkipLast.Get(context));
}
if(Wait.Expression != null)
{
targetCommand.AddParameter("Wait", Wait.Get(context));
}
if(Index.Expression != null)
{
targetCommand.AddParameter("Index", Index.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,226 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Select-String command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class SelectString : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public SelectString()
{
this.DisplayName = "Select-String";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Select-String"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Pattern parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Pattern { get; set; }
/// <summary>
/// Provides access to the Path parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Path { get; set; }
/// <summary>
/// Provides access to the LiteralPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> LiteralPath { get; set; }
/// <summary>
/// Provides access to the SimpleMatch parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> SimpleMatch { get; set; }
/// <summary>
/// Provides access to the CaseSensitive parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> CaseSensitive { get; set; }
/// <summary>
/// Provides access to the Quiet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Quiet { get; set; }
/// <summary>
/// Provides access to the List parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> List { get; set; }
/// <summary>
/// Provides access to the Include parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Include { get; set; }
/// <summary>
/// Provides access to the Exclude parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Exclude { get; set; }
/// <summary>
/// Provides access to the NotMatch parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NotMatch { get; set; }
/// <summary>
/// Provides access to the AllMatches parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> AllMatches { get; set; }
/// <summary>
/// Provides access to the Encoding parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Encoding { get; set; }
/// <summary>
/// Provides access to the Context parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32[]> Context { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Pattern.Expression != null)
{
targetCommand.AddParameter("Pattern", Pattern.Get(context));
}
if(Path.Expression != null)
{
targetCommand.AddParameter("Path", Path.Get(context));
}
if(LiteralPath.Expression != null)
{
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
}
if(SimpleMatch.Expression != null)
{
targetCommand.AddParameter("SimpleMatch", SimpleMatch.Get(context));
}
if(CaseSensitive.Expression != null)
{
targetCommand.AddParameter("CaseSensitive", CaseSensitive.Get(context));
}
if(Quiet.Expression != null)
{
targetCommand.AddParameter("Quiet", Quiet.Get(context));
}
if(List.Expression != null)
{
targetCommand.AddParameter("List", List.Get(context));
}
if(Include.Expression != null)
{
targetCommand.AddParameter("Include", Include.Get(context));
}
if(Exclude.Expression != null)
{
targetCommand.AddParameter("Exclude", Exclude.Get(context));
}
if(NotMatch.Expression != null)
{
targetCommand.AddParameter("NotMatch", NotMatch.Get(context));
}
if(AllMatches.Expression != null)
{
targetCommand.AddParameter("AllMatches", AllMatches.Get(context));
}
if(Encoding.Expression != null)
{
targetCommand.AddParameter("Encoding", Encoding.Get(context));
}
if(Context.Expression != null)
{
targetCommand.AddParameter("Context", Context.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,130 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Select-Xml command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class SelectXml : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public SelectXml()
{
this.DisplayName = "Select-Xml";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Select-Xml"; } }
// Arguments
/// <summary>
/// Provides access to the Path parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Path { get; set; }
/// <summary>
/// Provides access to the LiteralPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> LiteralPath { get; set; }
/// <summary>
/// Provides access to the Xml parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Xml.XmlNode[]> Xml { get; set; }
/// <summary>
/// Provides access to the Content parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Content { get; set; }
/// <summary>
/// Provides access to the XPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> XPath { get; set; }
/// <summary>
/// Provides access to the Namespace parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> Namespace { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(LiteralPath.Expression != null)
{
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
}
if(Xml.Expression != null)
{
targetCommand.AddParameter("Xml", Xml.Get(context));
}
if(Content.Expression != null)
{
targetCommand.AddParameter("Content", Content.Get(context));
}
if(XPath.Expression != null)
{
targetCommand.AddParameter("XPath", XPath.Get(context));
}
if(Namespace.Expression != null)
{
targetCommand.AddParameter("Namespace", Namespace.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,238 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Send-MailMessage command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class SendMailMessage : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public SendMailMessage()
{
this.DisplayName = "Send-MailMessage";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Send-MailMessage"; } }
// Arguments
/// <summary>
/// Provides access to the Attachments parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Attachments { get; set; }
/// <summary>
/// Provides access to the Bcc parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Bcc { get; set; }
/// <summary>
/// Provides access to the Body parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Body { get; set; }
/// <summary>
/// Provides access to the BodyAsHtml parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> BodyAsHtml { get; set; }
/// <summary>
/// Provides access to the Encoding parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Text.Encoding> Encoding { get; set; }
/// <summary>
/// Provides access to the Cc parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Cc { get; set; }
/// <summary>
/// Provides access to the DeliveryNotificationOption parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Net.Mail.DeliveryNotificationOptions> DeliveryNotificationOption { get; set; }
/// <summary>
/// Provides access to the From parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> From { get; set; }
/// <summary>
/// Provides access to the SmtpServer parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> SmtpServer { get; set; }
/// <summary>
/// Provides access to the Priority parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Net.Mail.MailPriority> Priority { get; set; }
/// <summary>
/// Provides access to the Subject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Subject { get; set; }
/// <summary>
/// Provides access to the To parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> To { get; set; }
/// <summary>
/// Provides access to the Credential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
/// <summary>
/// Provides access to the UseSsl parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseSsl { get; set; }
/// <summary>
/// Provides access to the Port parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Port { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Attachments.Expression != null)
{
targetCommand.AddParameter("Attachments", Attachments.Get(context));
}
if(Bcc.Expression != null)
{
targetCommand.AddParameter("Bcc", Bcc.Get(context));
}
if(Body.Expression != null)
{
targetCommand.AddParameter("Body", Body.Get(context));
}
if(BodyAsHtml.Expression != null)
{
targetCommand.AddParameter("BodyAsHtml", BodyAsHtml.Get(context));
}
if(Encoding.Expression != null)
{
targetCommand.AddParameter("Encoding", Encoding.Get(context));
}
if(Cc.Expression != null)
{
targetCommand.AddParameter("Cc", Cc.Get(context));
}
if(DeliveryNotificationOption.Expression != null)
{
targetCommand.AddParameter("DeliveryNotificationOption", DeliveryNotificationOption.Get(context));
}
if(From.Expression != null)
{
targetCommand.AddParameter("From", From.Get(context));
}
if(SmtpServer.Expression != null)
{
targetCommand.AddParameter("SmtpServer", SmtpServer.Get(context));
}
if(Priority.Expression != null)
{
targetCommand.AddParameter("Priority", Priority.Get(context));
}
if(Subject.Expression != null)
{
targetCommand.AddParameter("Subject", Subject.Get(context));
}
if(To.Expression != null)
{
targetCommand.AddParameter("To", To.Get(context));
}
if(Credential.Expression != null)
{
targetCommand.AddParameter("Credential", Credential.Get(context));
}
if(UseSsl.Expression != null)
{
targetCommand.AddParameter("UseSsl", UseSsl.Get(context));
}
if(Port.Expression != null)
{
targetCommand.AddParameter("Port", Port.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,94 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Set-Date command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class SetDate : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public SetDate()
{
this.DisplayName = "Set-Date";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Set-Date"; } }
// Arguments
/// <summary>
/// Provides access to the Date parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.DateTime> Date { get; set; }
/// <summary>
/// Provides access to the Adjust parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.TimeSpan> Adjust { get; set; }
/// <summary>
/// Provides access to the DisplayHint parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.PowerShell.Commands.DisplayHintType> DisplayHint { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Date.Expression != null)
{
targetCommand.AddParameter("Date", Date.Get(context));
}
if(Adjust.Expression != null)
{
targetCommand.AddParameter("Adjust", Adjust.Get(context));
}
if(DisplayHint.Expression != null)
{
targetCommand.AddParameter("DisplayHint", DisplayHint.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,178 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Set-TraceSource command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class SetTraceSource : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public SetTraceSource()
{
this.DisplayName = "Set-TraceSource";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Set-TraceSource"; } }
// Arguments
/// <summary>
/// Provides access to the Name parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Name { get; set; }
/// <summary>
/// Provides access to the Option parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSTraceSourceOptions> Option { get; set; }
/// <summary>
/// Provides access to the ListenerOption parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Diagnostics.TraceOptions> ListenerOption { get; set; }
/// <summary>
/// Provides access to the FilePath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> FilePath { get; set; }
/// <summary>
/// Provides access to the Force parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
/// <summary>
/// Provides access to the Debugger parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Debugger { get; set; }
/// <summary>
/// Provides access to the PSHost parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> PSHost { get; set; }
/// <summary>
/// Provides access to the RemoveListener parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> RemoveListener { get; set; }
/// <summary>
/// Provides access to the RemoveFileListener parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> RemoveFileListener { get; set; }
/// <summary>
/// Provides access to the PassThru parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Name.Expression != null)
{
targetCommand.AddParameter("Name", Name.Get(context));
}
if(Option.Expression != null)
{
targetCommand.AddParameter("Option", Option.Get(context));
}
if(ListenerOption.Expression != null)
{
targetCommand.AddParameter("ListenerOption", ListenerOption.Get(context));
}
if(FilePath.Expression != null)
{
targetCommand.AddParameter("FilePath", FilePath.Get(context));
}
if(Force.Expression != null)
{
targetCommand.AddParameter("Force", Force.Get(context));
}
if(Debugger.Expression != null)
{
targetCommand.AddParameter("Debugger", Debugger.Get(context));
}
if(PSHost.Expression != null)
{
targetCommand.AddParameter("PSHost", PSHost.Get(context));
}
if(RemoveListener.Expression != null)
{
targetCommand.AddParameter("RemoveListener", RemoveListener.Get(context));
}
if(RemoveFileListener.Expression != null)
{
targetCommand.AddParameter("RemoveFileListener", RemoveFileListener.Get(context));
}
if(PassThru.Expression != null)
{
targetCommand.AddParameter("PassThru", PassThru.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,130 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Sort-Object command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class SortObject : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public SortObject()
{
this.DisplayName = "Sort-Object";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Sort-Object"; } }
// Arguments
/// <summary>
/// Provides access to the Descending parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Descending { get; set; }
/// <summary>
/// Provides access to the Unique parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Unique { get; set; }
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Property parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object[]> Property { get; set; }
/// <summary>
/// Provides access to the Culture parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Culture { get; set; }
/// <summary>
/// Provides access to the CaseSensitive parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> CaseSensitive { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Descending.Expression != null)
{
targetCommand.AddParameter("Descending", Descending.Get(context));
}
if(Unique.Expression != null)
{
targetCommand.AddParameter("Unique", Unique.Get(context));
}
if(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Property.Expression != null)
{
targetCommand.AddParameter("Property", Property.Get(context));
}
if(Culture.Expression != null)
{
targetCommand.AddParameter("Culture", Culture.Get(context));
}
if(CaseSensitive.Expression != null)
{
targetCommand.AddParameter("CaseSensitive", CaseSensitive.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,82 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Start-Sleep command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class StartSleep : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public StartSleep()
{
this.DisplayName = "Start-Sleep";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Start-Sleep"; } }
// Arguments
/// <summary>
/// Provides access to the Seconds parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Seconds { get; set; }
/// <summary>
/// Provides access to the Milliseconds parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Milliseconds { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Seconds.Expression != null)
{
targetCommand.AddParameter("Seconds", Seconds.Get(context));
}
if(Milliseconds.Expression != null)
{
targetCommand.AddParameter("Milliseconds", Milliseconds.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,118 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Tee-Object command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class TeeObject : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public TeeObject()
{
this.DisplayName = "Tee-Object";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Tee-Object"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the FilePath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> FilePath { get; set; }
/// <summary>
/// Provides access to the LiteralPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> LiteralPath { get; set; }
/// <summary>
/// Provides access to the Append parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Append { get; set; }
/// <summary>
/// Provides access to the Variable parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Variable { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(FilePath.Expression != null)
{
targetCommand.AddParameter("FilePath", FilePath.Get(context));
}
if(LiteralPath.Expression != null)
{
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
}
if(Append.Expression != null)
{
targetCommand.AddParameter("Append", Append.Get(context));
}
if(Variable.Expression != null)
{
targetCommand.AddParameter("Variable", Variable.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,82 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Unblock-File command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class UnblockFile : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public UnblockFile()
{
this.DisplayName = "Unblock-File";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Unblock-File"; } }
// Arguments
/// <summary>
/// Provides access to the Path parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Path { get; set; }
/// <summary>
/// Provides access to the LiteralPath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> LiteralPath { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(LiteralPath.Expression != null)
{
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,94 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Unregister-Event command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class UnregisterEvent : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public UnregisterEvent()
{
this.DisplayName = "Unregister-Event";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Unregister-Event"; } }
// Arguments
/// <summary>
/// Provides access to the SourceIdentifier parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> SourceIdentifier { get; set; }
/// <summary>
/// Provides access to the SubscriptionId parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> SubscriptionId { get; set; }
/// <summary>
/// Provides access to the Force parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(SourceIdentifier.Expression != null)
{
targetCommand.AddParameter("SourceIdentifier", SourceIdentifier.Get(context));
}
if(SubscriptionId.Expression != null)
{
targetCommand.AddParameter("SubscriptionId", SubscriptionId.Get(context));
}
if(Force.Expression != null)
{
targetCommand.AddParameter("Force", Force.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,118 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Update-List command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class UpdateList : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public UpdateList()
{
this.DisplayName = "Update-List";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Update-List"; } }
// Arguments
/// <summary>
/// Provides access to the Add parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object[]> Add { get; set; }
/// <summary>
/// Provides access to the Remove parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object[]> Remove { get; set; }
/// <summary>
/// Provides access to the Replace parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object[]> Replace { get; set; }
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
/// <summary>
/// Provides access to the Property parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Property { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Add.Expression != null)
{
targetCommand.AddParameter("Add", Add.Get(context));
}
if(Remove.Expression != null)
{
targetCommand.AddParameter("Remove", Remove.Get(context));
}
if(Replace.Expression != null)
{
targetCommand.AddParameter("Replace", Replace.Get(context));
}
if(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(Property.Expression != null)
{
targetCommand.AddParameter("Property", Property.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,82 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Wait-Event command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class WaitEvent : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public WaitEvent()
{
this.DisplayName = "Wait-Event";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Wait-Event"; } }
// Arguments
/// <summary>
/// Provides access to the SourceIdentifier parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> SourceIdentifier { get; set; }
/// <summary>
/// Provides access to the Timeout parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Timeout { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(SourceIdentifier.Expression != null)
{
targetCommand.AddParameter("SourceIdentifier", SourceIdentifier.Get(context));
}
if(Timeout.Expression != null)
{
targetCommand.AddParameter("Timeout", Timeout.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,70 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Write-Debug command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class WriteDebug : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public WriteDebug()
{
this.DisplayName = "Write-Debug";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Write-Debug"; } }
// Arguments
/// <summary>
/// Provides access to the Message parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Message { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Message.Expression != null)
{
targetCommand.AddParameter("Message", Message.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,190 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Write-Error command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class WriteError : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public WriteError()
{
this.DisplayName = "Write-Error";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Write-Error"; } }
// Arguments
/// <summary>
/// Provides access to the Exception parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Exception> Exception { get; set; }
/// <summary>
/// Provides access to the Message parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Message { get; set; }
/// <summary>
/// Provides access to the ErrorRecord parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.ErrorRecord> ErrorRecord { get; set; }
/// <summary>
/// Provides access to the Category parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.ErrorCategory> Category { get; set; }
/// <summary>
/// Provides access to the ErrorId parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ErrorId { get; set; }
/// <summary>
/// Provides access to the TargetObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object> TargetObject { get; set; }
/// <summary>
/// Provides access to the RecommendedAction parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> RecommendedAction { get; set; }
/// <summary>
/// Provides access to the CategoryActivity parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CategoryActivity { get; set; }
/// <summary>
/// Provides access to the CategoryReason parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CategoryReason { get; set; }
/// <summary>
/// Provides access to the CategoryTargetName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CategoryTargetName { get; set; }
/// <summary>
/// Provides access to the CategoryTargetType parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CategoryTargetType { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Exception.Expression != null)
{
targetCommand.AddParameter("Exception", Exception.Get(context));
}
if(Message.Expression != null)
{
targetCommand.AddParameter("Message", Message.Get(context));
}
if(ErrorRecord.Expression != null)
{
targetCommand.AddParameter("ErrorRecord", ErrorRecord.Get(context));
}
if(Category.Expression != null)
{
targetCommand.AddParameter("Category", Category.Get(context));
}
if(ErrorId.Expression != null)
{
targetCommand.AddParameter("ErrorId", ErrorId.Get(context));
}
if(TargetObject.Expression != null)
{
targetCommand.AddParameter("TargetObject", TargetObject.Get(context));
}
if(RecommendedAction.Expression != null)
{
targetCommand.AddParameter("RecommendedAction", RecommendedAction.Get(context));
}
if(CategoryActivity.Expression != null)
{
targetCommand.AddParameter("CategoryActivity", CategoryActivity.Get(context));
}
if(CategoryReason.Expression != null)
{
targetCommand.AddParameter("CategoryReason", CategoryReason.Get(context));
}
if(CategoryTargetName.Expression != null)
{
targetCommand.AddParameter("CategoryTargetName", CategoryTargetName.Get(context));
}
if(CategoryTargetType.Expression != null)
{
targetCommand.AddParameter("CategoryTargetType", CategoryTargetType.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,82 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Write-Information command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class WriteInformation : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public WriteInformation()
{
this.DisplayName = "Write-Information";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Write-Information"; } }
// Arguments
/// <summary>
/// Provides access to the MessageData parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Object> MessageData { get; set; }
/// <summary>
/// Provides access to the Tags parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> Tags { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(MessageData.Expression != null)
{
targetCommand.AddParameter("MessageData", MessageData.Get(context));
}
if(Tags.Expression != null)
{
targetCommand.AddParameter("Tags", Tags.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,82 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Write-Output command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class WriteOutput : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public WriteOutput()
{
this.DisplayName = "Write-Output";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Write-Output"; } }
// Arguments
/// <summary>
/// Provides access to the InputObject parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSObject[]> InputObject { get; set; }
/// <summary>
/// Provides access to the NoEnumerate parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NoEnumerate { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(InputObject.Expression != null)
{
targetCommand.AddParameter("InputObject", InputObject.Get(context));
}
if(NoEnumerate.Expression != null)
{
targetCommand.AddParameter("NoEnumerate", NoEnumerate.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,166 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Write-Progress command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class WriteProgress : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public WriteProgress()
{
this.DisplayName = "Write-Progress";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Write-Progress"; } }
// Arguments
/// <summary>
/// Provides access to the Activity parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Activity { get; set; }
/// <summary>
/// Provides access to the Status parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Status { get; set; }
/// <summary>
/// Provides access to the ProgressId parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> ProgressId { get; set; }
/// <summary>
/// Provides access to the PercentComplete parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> PercentComplete { get; set; }
/// <summary>
/// Provides access to the SecondsRemaining parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> SecondsRemaining { get; set; }
/// <summary>
/// Provides access to the CurrentOperation parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CurrentOperation { get; set; }
/// <summary>
/// Provides access to the ParentId parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> ParentId { get; set; }
/// <summary>
/// Provides access to the Completed parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Completed { get; set; }
/// <summary>
/// Provides access to the SourceId parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> SourceId { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Activity.Expression != null)
{
targetCommand.AddParameter("Activity", Activity.Get(context));
}
if(Status.Expression != null)
{
targetCommand.AddParameter("Status", Status.Get(context));
}
if(ProgressId.Expression != null)
{
targetCommand.AddParameter("Id", ProgressId.Get(context));
}
if(PercentComplete.Expression != null)
{
targetCommand.AddParameter("PercentComplete", PercentComplete.Get(context));
}
if(SecondsRemaining.Expression != null)
{
targetCommand.AddParameter("SecondsRemaining", SecondsRemaining.Get(context));
}
if(CurrentOperation.Expression != null)
{
targetCommand.AddParameter("CurrentOperation", CurrentOperation.Get(context));
}
if(ParentId.Expression != null)
{
targetCommand.AddParameter("ParentId", ParentId.Get(context));
}
if(Completed.Expression != null)
{
targetCommand.AddParameter("Completed", Completed.Get(context));
}
if(SourceId.Expression != null)
{
targetCommand.AddParameter("SourceId", SourceId.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,70 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Write-Verbose command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class WriteVerbose : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public WriteVerbose()
{
this.DisplayName = "Write-Verbose";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Write-Verbose"; } }
// Arguments
/// <summary>
/// Provides access to the Message parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Message { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Message.Expression != null)
{
targetCommand.AddParameter("Message", Message.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,70 @@
//
// 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.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Write-Warning command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class WriteWarning : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public WriteWarning()
{
this.DisplayName = "Write-Warning";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Write-Warning"; } }
// Arguments
/// <summary>
/// Provides access to the Message parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Message { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(Message.Expression != null)
{
targetCommand.AddParameter("Message", Message.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,105 @@
using System;
using Microsoft.PowerShell.Activities;
using System.Activities;
using System.Collections.Generic;
using System.ComponentModel;
namespace Microsoft.PowerShell.Utility.Activities
{
/// <summary>
/// Activity to invoke the Microsoft.PowerShell.Utility\Import-LocalizedData command in a Workflow.
/// </summary>
public sealed class ImportLocalizedData : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ImportLocalizedData()
{
this.DisplayName = "Import-LocalizedData";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.PowerShell.Utility\\Import-LocalizedData"; } }
// Arguments
/// <summary>
/// Provides access to the UICulture parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> UICulture { get; set; }
/// <summary>
/// Provides access to the BaseDirectory parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> BaseDirectory { get; set; }
/// <summary>
/// Provides access to the FileName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> FileName { get; set; }
/// <summary>
/// Provides access to the SupportedCommand parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> SupportedCommand { get; set; }
// Module defining this command
// Additional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
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(UICulture.Expression != null)
{
targetCommand.AddParameter("UICulture", UICulture.Get(context));
}
if(BaseDirectory.Expression != null)
{
targetCommand.AddParameter("BaseDirectory", BaseDirectory.Get(context));
}
//If BaseDirectory is not specified, try to use the workflow base directory.
else
{
throw new ArgumentException(GeneratedActivitiesResources.ImportLocalizedDataWithEmptyEmptyorNullBaseDirectory);
}
if(FileName.Expression != null)
{
targetCommand.AddParameter("FileName", FileName.Get(context));
}
if(SupportedCommand.Expression != null)
{
targetCommand.AddParameter("SupportedCommand", SupportedCommand.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ImportLocalizedDataWithEmptyEmptyorNullBaseDirectory" xml:space="preserve">
<value>Cannot have an empty BaseDirectory for importing localized data. Please specify a valid BaseDirectory and run the command again.</value>
<comment>BaseDirectory should not be localized. This is a parameter.</comment>
</data>
</root>