示例#1
0
        public static T InvokeFirst <T>(this System.Management.Automation.Cmdlet cmd)
        {
            var results = cmd.Invoke <T>();
            T   output  = results.First();

            return(output);
        }
示例#2
0
        public static void InvokeVoid(this System.Management.Automation.Cmdlet cmd)
        {
            var results = cmd.Invoke();

            foreach (object item in results)
            {
            }
        }
示例#3
0
 internal PowerShellOutputAppender(System.Management.Automation.Cmdlet cmdlet)
 {
     _cmdlet = cmdlet ?? throw new ArgumentNullException(nameof(cmdlet));
 }