Example #1
0
        // 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
            });
        }
Example #2
0
        // 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 };
        }
Example #3
0
        // 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
            });
        }
        protected override void Execute(NativeActivityContext context)
        {
            var dyn    = InputObject.Get(context) as IDictionary <string, object>;
            var prop   = PropertyName.Get(context);
            var result = dyn[prop];

            context.SetValue(Result, result);
            Console.WriteLine("{0} = {1}", prop, result);
        }
        // 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 System.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 (Force.Expression != null)
            {
                targetCommand.AddParameter("Force", Force.Get(context));
            }

            if (NoWait.Expression != null)
            {
                targetCommand.AddParameter("NoWait", NoWait.Get(context));
            }

            if (Name.Expression != null)
            {
                targetCommand.AddParameter("Name", Name.Get(context));
            }

            if (InputObject.Expression != null)
            {
                targetCommand.AddParameter("InputObject", InputObject.Get(context));
            }

            if (PassThru.Expression != null)
            {
                targetCommand.AddParameter("PassThru", PassThru.Get(context));
            }

            if (ServiceDisplayName.Expression != null)
            {
                targetCommand.AddParameter("DisplayName", ServiceDisplayName.Get(context));
            }

            if (Include.Expression != null)
            {
                targetCommand.AddParameter("Include", Include.Get(context));
            }

            if (Exclude.Expression != null)
            {
                targetCommand.AddParameter("Exclude", Exclude.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
Example #6
0
        // 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 System.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 (InputObject.Expression != null)
            {
                targetCommand.AddParameter("InputObject", InputObject.Get(context));
            }

            if (LiteralPath.Expression != null)
            {
                targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
            }

            if (Audit.Expression != null)
            {
                targetCommand.AddParameter("Audit", Audit.Get(context));
            }

            if (AllCentralAccessPolicies.Expression != null)
            {
                targetCommand.AddParameter("AllCentralAccessPolicies", AllCentralAccessPolicies.Get(context));
            }

            if (Filter.Expression != null)
            {
                targetCommand.AddParameter("Filter", Filter.Get(context));
            }

            if (Include.Expression != null)
            {
                targetCommand.AddParameter("Include", Include.Get(context));
            }

            if (Exclude.Expression != null)
            {
                targetCommand.AddParameter("Exclude", Exclude.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
        // 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 System.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
            });
        }
Example #8
0
        // 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 (DependentServices.Expression != null)
            {
                targetCommand.AddParameter("DependentServices", DependentServices.Get(context));
            }

            if (RequiredServices.Expression != null)
            {
                targetCommand.AddParameter("RequiredServices", RequiredServices.Get(context));
            }

            if (ServiceDisplayName.Expression != null)
            {
                targetCommand.AddParameter("DisplayName", ServiceDisplayName.Get(context));
            }

            if (Include.Expression != null)
            {
                targetCommand.AddParameter("Include", Include.Get(context));
            }

            if (Exclude.Expression != null)
            {
                targetCommand.AddParameter("Exclude", Exclude.Get(context));
            }

            if (InputObject.Expression != null)
            {
                targetCommand.AddParameter("InputObject", InputObject.Get(context));
            }

            if (GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
            {
                targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
        // 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 System.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 (Namespace.Expression != null)
            {
                targetCommand.AddParameter("Namespace", Namespace.Get(context));
            }

            if (OperationTimeoutSec.Expression != null)
            {
                targetCommand.AddParameter("OperationTimeoutSec", OperationTimeoutSec.Get(context));
            }

            if (InputObject.Expression != null)
            {
                targetCommand.AddParameter("InputObject", InputObject.Get(context));
            }

            if (Query.Expression != null)
            {
                targetCommand.AddParameter("Query", Query.Get(context));
            }

            if (QueryDialect.Expression != null)
            {
                targetCommand.AddParameter("QueryDialect", QueryDialect.Get(context));
            }

            if (Property.Expression != null)
            {
                targetCommand.AddParameter("Property", Property.Get(context));
            }

            if (PassThru.Expression != null)
            {
                targetCommand.AddParameter("PassThru", PassThru.Get(context));
            }

            if (ResourceUri != null)
            {
                targetCommand.AddParameter("ResourceUri", ResourceUri.Get(context));
            }

            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
        // 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 System.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 (ProcessId.Expression != null)
            {
                targetCommand.AddParameter("Id", ProcessId.Get(context));
            }

            if (InputObject.Expression != null)
            {
                targetCommand.AddParameter("InputObject", InputObject.Get(context));
            }

            if (IncludeUserName.Expression != null)
            {
                targetCommand.AddParameter("IncludeUserName", IncludeUserName.Get(context));
            }

            if (Module.Expression != null)
            {
                targetCommand.AddParameter("Module", Module.Get(context));
            }

            if (FileVersionInfo.Expression != null)
            {
                targetCommand.AddParameter("FileVersionInfo", FileVersionInfo.Get(context));
            }

            if (GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
            {
                targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
        // 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 System.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 (Begin.Expression != null)
            {
                targetCommand.AddParameter("Begin", Begin.Get(context));
            }

            if (Process.Expression != null)
            {
                targetCommand.AddParameter("Process", Process.Get(context));
            }

            if (End.Expression != null)
            {
                targetCommand.AddParameter("End", End.Get(context));
            }

            if (RemainingScripts.Expression != null)
            {
                targetCommand.AddParameter("RemainingScripts", RemainingScripts.Get(context));
            }

            if (MemberName.Expression != null)
            {
                targetCommand.AddParameter("MemberName", MemberName.Get(context));
            }

            if (ArgumentList.Expression != null)
            {
                targetCommand.AddParameter("ArgumentList", ArgumentList.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
Example #12
0
        // 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
            });
        }
        // 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 System.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
            });
        }
Example #14
0
        // 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
            });
        }
        // 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 System.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 (FileFormat.Expression != null)
            {
                targetCommand.AddParameter("FileFormat", FileFormat.Get(context));
            }

            if (MaxSize.Expression != null)
            {
                targetCommand.AddParameter("MaxSize", MaxSize.Get(context));
            }

            if (InputObject.Expression != null)
            {
                targetCommand.AddParameter("InputObject", InputObject.Get(context));
            }

            if (Force.Expression != null)
            {
                targetCommand.AddParameter("Force", Force.Get(context));
            }

            if (Circular.Expression != null)
            {
                targetCommand.AddParameter("Circular", Circular.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
Example #16
0
        private bool ValidateInputs(List <LZFighterStateTransition.Input> inputs)
        {
            bool result = true;

            foreach (var input in inputs)
            {
                LZFIGHTERINPUTEVENT inputEvent = input.ev;
                if (fighter.invertHorizontal)
                {
                    if (inputEvent == LZFIGHTERINPUTEVENT.RIGHT)
                    {
                        inputEvent = LZFIGHTERINPUTEVENT.LEFT;
                    }
                    else if (inputEvent == LZFIGHTERINPUTEVENT.LEFT)
                    {
                        inputEvent = LZFIGHTERINPUTEVENT.RIGHT;
                    }
                }
                InputObject inputObject = fighter.controller.GetInput(inputEvent);
                bool        value       = false;
                switch (input.type)
                {
                case LZFighterStateTransition.INPUT_TYPE.DOWN:
                    value = inputObject.GetDown();
                    break;

                case LZFighterStateTransition.INPUT_TYPE.UP:
                    value = inputObject.GetUp();
                    break;

                case LZFighterStateTransition.INPUT_TYPE.VALUE:
                    value = inputObject.Get();
                    break;

                default:
                    break;
                }
                result &= (input.no)?!value:value;
            }
            return(result);
        }
Example #17
0
        // 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
            });
        }
Example #18
0
        protected override void Execute(CodeActivityContext context)
        {
            var    templateString = TemplateString.Get(context);
            var    templatePath   = TemplatePath.Get(context);
            var    obj            = InputObject.Get(context);
            var    stubble        = new StubbleBuilder().Build();
            string output;

            if (!string.IsNullOrEmpty(templateString))
            {
                output = stubble.Render(templateString, obj);
            }
            else
            {
                using (StreamReader streamReader = new StreamReader(templatePath, Encoding.UTF8))
                {
                    output = stubble.Render(streamReader.ReadToEnd(), obj);
                }
            }


            Output.Set(context, output);
        }
Example #19
0
        public bool ValidateInput(LZFighterStateTransition.Input input)
        {
            LZFIGHTERINPUTEVENT inputEvent = input.ev;

            if (invertHorizontal)
            {
                if (inputEvent == LZFIGHTERINPUTEVENT.RIGHT)
                {
                    inputEvent = LZFIGHTERINPUTEVENT.LEFT;
                }
                else if (inputEvent == LZFIGHTERINPUTEVENT.LEFT)
                {
                    inputEvent = LZFIGHTERINPUTEVENT.RIGHT;
                }
            }
            InputObject inputObject = controller.GetInput(inputEvent);
            bool        value       = false;

            switch (input.type)
            {
            case LZFighterStateTransition.INPUT_TYPE.DOWN:
                value = inputObject.GetDown();
                break;

            case LZFighterStateTransition.INPUT_TYPE.UP:
                value = inputObject.GetUp();
                break;

            case LZFighterStateTransition.INPUT_TYPE.VALUE:
                value = inputObject.Get();
                break;

            default:
                break;
            }
            return(value);
        }
Example #20
0
        // 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 (FilterScript.Expression != null)
            {
                targetCommand.AddParameter("FilterScript", FilterScript.Get(context));
            }

            if (Property.Expression != null)
            {
                targetCommand.AddParameter("Property", Property.Get(context));
            }

            if (Value.Expression != null)
            {
                targetCommand.AddParameter("Value", Value.Get(context));
            }

            if (EQ.Expression != null)
            {
                targetCommand.AddParameter("EQ", EQ.Get(context));
            }

            if (CEQ.Expression != null)
            {
                targetCommand.AddParameter("CEQ", CEQ.Get(context));
            }

            if (NE.Expression != null)
            {
                targetCommand.AddParameter("NE", NE.Get(context));
            }

            if (CNE.Expression != null)
            {
                targetCommand.AddParameter("CNE", CNE.Get(context));
            }

            if (GT.Expression != null)
            {
                targetCommand.AddParameter("GT", GT.Get(context));
            }

            if (CGT.Expression != null)
            {
                targetCommand.AddParameter("CGT", CGT.Get(context));
            }

            if (LT.Expression != null)
            {
                targetCommand.AddParameter("LT", LT.Get(context));
            }

            if (CLT.Expression != null)
            {
                targetCommand.AddParameter("CLT", CLT.Get(context));
            }

            if (GE.Expression != null)
            {
                targetCommand.AddParameter("GE", GE.Get(context));
            }

            if (CGE.Expression != null)
            {
                targetCommand.AddParameter("CGE", CGE.Get(context));
            }

            if (LE.Expression != null)
            {
                targetCommand.AddParameter("LE", LE.Get(context));
            }

            if (CLE.Expression != null)
            {
                targetCommand.AddParameter("CLE", CLE.Get(context));
            }

            if (Like.Expression != null)
            {
                targetCommand.AddParameter("Like", Like.Get(context));
            }

            if (CLike.Expression != null)
            {
                targetCommand.AddParameter("CLike", CLike.Get(context));
            }

            if (NotLike.Expression != null)
            {
                targetCommand.AddParameter("NotLike", NotLike.Get(context));
            }

            if (CNotLike.Expression != null)
            {
                targetCommand.AddParameter("CNotLike", CNotLike.Get(context));
            }

            if (Match.Expression != null)
            {
                targetCommand.AddParameter("Match", Match.Get(context));
            }

            if (CMatch.Expression != null)
            {
                targetCommand.AddParameter("CMatch", CMatch.Get(context));
            }

            if (NotMatch.Expression != null)
            {
                targetCommand.AddParameter("NotMatch", NotMatch.Get(context));
            }

            if (CNotMatch.Expression != null)
            {
                targetCommand.AddParameter("CNotMatch", CNotMatch.Get(context));
            }

            if (Contains.Expression != null)
            {
                targetCommand.AddParameter("Contains", Contains.Get(context));
            }

            if (CContains.Expression != null)
            {
                targetCommand.AddParameter("CContains", CContains.Get(context));
            }

            if (NotContains.Expression != null)
            {
                targetCommand.AddParameter("NotContains", NotContains.Get(context));
            }

            if (CNotContains.Expression != null)
            {
                targetCommand.AddParameter("CNotContains", CNotContains.Get(context));
            }

            if (In.Expression != null)
            {
                targetCommand.AddParameter("In", In.Get(context));
            }

            if (CIn.Expression != null)
            {
                targetCommand.AddParameter("CIn", CIn.Get(context));
            }

            if (NotIn.Expression != null)
            {
                targetCommand.AddParameter("NotIn", NotIn.Get(context));
            }

            if (CNotIn.Expression != null)
            {
                targetCommand.AddParameter("CNotIn", CNotIn.Get(context));
            }

            if (Is.Expression != null)
            {
                targetCommand.AddParameter("Is", Is.Get(context));
            }

            if (IsNot.Expression != null)
            {
                targetCommand.AddParameter("IsNot", IsNot.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
Example #21
0
        // 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 System.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
            });
        }
Example #22
0
        // 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
            });
        }
        // 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 System.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
            });
        }
Example #24
0
        // 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 System.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 (Class.Expression != null)
            {
                targetCommand.AddParameter("Class", Class.Get(context));
            }

            if (Arguments.Expression != null)
            {
                targetCommand.AddParameter("Arguments", Arguments.Get(context));
            }

            if (PutType.Expression != null)
            {
                targetCommand.AddParameter("PutType", PutType.Get(context));
            }

            if (AsJob.Expression != null)
            {
                targetCommand.AddParameter("AsJob", AsJob.Get(context));
            }

            if (Impersonation.Expression != null)
            {
                targetCommand.AddParameter("Impersonation", Impersonation.Get(context));
            }

            if (Authentication.Expression != null)
            {
                targetCommand.AddParameter("Authentication", Authentication.Get(context));
            }

            if (Locale.Expression != null)
            {
                targetCommand.AddParameter("Locale", Locale.Get(context));
            }

            if (EnableAllPrivileges.Expression != null)
            {
                targetCommand.AddParameter("EnableAllPrivileges", EnableAllPrivileges.Get(context));
            }

            if (Authority.Expression != null)
            {
                targetCommand.AddParameter("Authority", Authority.Get(context));
            }

            if (Credential.Expression != null)
            {
                targetCommand.AddParameter("Credential", Credential.Get(context));
            }

            if (ThrottleLimit.Expression != null)
            {
                targetCommand.AddParameter("ThrottleLimit", ThrottleLimit.Get(context));
            }

            if (ComputerName.Expression != null)
            {
                targetCommand.AddParameter("ComputerName", ComputerName.Get(context));
            }

            if (Namespace.Expression != null)
            {
                targetCommand.AddParameter("Namespace", Namespace.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
Example #25
0
        // 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 System.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
            });
        }
        // 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 (Name.Expression != null)
            {
                targetCommand.AddParameter("Name", Name.Get(context));
            }

            if (Value.Expression != null)
            {
                targetCommand.AddParameter("Value", Value.Get(context));
            }

            if (InputObject.Expression != null)
            {
                targetCommand.AddParameter("InputObject", InputObject.Get(context));
            }

            if (PassThru.Expression != null)
            {
                targetCommand.AddParameter("PassThru", PassThru.Get(context));
            }

            if (Force.Expression != null)
            {
                targetCommand.AddParameter("Force", Force.Get(context));
            }

            if (Filter.Expression != null)
            {
                targetCommand.AddParameter("Filter", Filter.Get(context));
            }

            if (Include.Expression != null)
            {
                targetCommand.AddParameter("Include", Include.Get(context));
            }

            if (Exclude.Expression != null)
            {
                targetCommand.AddParameter("Exclude", Exclude.Get(context));
            }

            if (Credential.Expression != null)
            {
                targetCommand.AddParameter("Credential", Credential.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
        // 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 System.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
            });
        }
        // 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 System.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 (DefinitionName.Expression != null)
            {
                targetCommand.AddParameter("DefinitionName", DefinitionName.Get(context));
            }

            if (DefinitionPath.Expression != null)
            {
                targetCommand.AddParameter("DefinitionPath", DefinitionPath.Get(context));
            }

            if (Type.Expression != null)
            {
                targetCommand.AddParameter("Type", Type.Get(context));
            }

            if (Name.Expression != null)
            {
                targetCommand.AddParameter("Name", Name.Get(context));
            }

            if (ScriptBlock.Expression != null)
            {
                targetCommand.AddParameter("ScriptBlock", ScriptBlock.Get(context));
            }

            if (Credential.Expression != null)
            {
                targetCommand.AddParameter("Credential", Credential.Get(context));
            }

            if (FilePath.Expression != null)
            {
                targetCommand.AddParameter("FilePath", FilePath.Get(context));
            }

            if (LiteralPath.Expression != null)
            {
                targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
            }

            if (Authentication.Expression != null)
            {
                targetCommand.AddParameter("Authentication", Authentication.Get(context));
            }

            if (InitializationScript.Expression != null)
            {
                targetCommand.AddParameter("InitializationScript", InitializationScript.Get(context));
            }

            if (RunAs32.Expression != null)
            {
                targetCommand.AddParameter("RunAs32", RunAs32.Get(context));
            }

            if (PSVersion.Expression != null)
            {
                targetCommand.AddParameter("PSVersion", PSVersion.Get(context));
            }

            if (InputObject.Expression != null)
            {
                targetCommand.AddParameter("InputObject", InputObject.Get(context));
            }

            if (ArgumentList.Expression != null)
            {
                targetCommand.AddParameter("ArgumentList", ArgumentList.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }