/// <summary> /// Invokes the module cmdlet. /// </summary> /// <param name="cmdlet">The cmdlet.</param> /// <param name="commandName">Name of the command.</param> /// <param name="commandArgs">The command arguments.</param> public static void InvokeModuleCmdlet(this PSCmdlet cmdlet, string commandName, IDictionary commandArgs = null) { cmdlet.InvokePsCommand($"AzureDevOpsMgmt\\{commandName}", commandArgs); }
/// <summary> /// Invokes the module cmdlet. /// </summary> /// <typeparam name="T">The type to be returned to the calling cmdlet</typeparam> /// <param name="cmdlet">The cmdlet.</param> /// <param name="commandName">Name of the command.</param> /// <param name="commandArgs">The command arguments.</param> /// <returns>The Collection of T.</returns> public static Collection <T> InvokeModuleCmdlet <T>( this PSCmdlet cmdlet, string commandName, IDictionary commandArgs = null) => cmdlet.InvokePsCommand <T>($"AzureDevOpsMgmt\\{commandName}", commandArgs);