/// <summary> /// Construct a new PSCommand parsing the provided arguments using the provided list of arguments supported by this cmdlet /// </summary> /// <param name="userArguments">Arguments to be parsed</param> /// <param name="supportedArguments">Arguments supported by this cmdlet</param> public PSCommand(string[] userArguments, ArgumentList supportedArguments) { // To any command add support for specifying a remote computername including username and password // It is up to the command whether it makes use of these optional parameters supportedArguments.AddRange(new List <Argument>() { new StringArgument("ComputerName", ".", true), new StringArgument("Username", true), new StringArgument("Password", true) }); _arguments = ParseArguments(userArguments, supportedArguments); _results = new CommandResult(); }
private void ToODialect(CodeWriter writer) { type.ToDialect(writer); ArgumentList arguments = new ArgumentList(); if (copyFrom != null) { arguments.Add(new Argument(new AttributeParameter("from"), copyFrom)); } if (this.arguments != null) { arguments.AddRange(this.arguments); } arguments.ToDialect(writer); }
private void MapSelectedTracks() { _arguments.AddRange(_selectedTracks.SelectMany(TrackMetadataArgs)); }