예제 #1
0
 internal static T GetUnboundValue <T>(this PSCmdlet cmdlet, int unnamedPosition)
 {
     if (unnamedPosition >= 0)
     {
         return(cmdlet.GetUnboundValue <T>(String.Empty, unnamedPosition));
     }
     else
     {
         throw new ArgumentException("unnamedPosition", "The position must be greater than or equal to 0.");
     }
 }
예제 #2
0
 internal static T GetUnboundValue <T>(this PSCmdlet cmdlet, string paramName)
 {
     if (!String.IsNullOrEmpty(paramName))
     {
         return(cmdlet.GetUnboundValue <T>(paramName, -1));
     }
     else
     {
         throw new ArgumentNullException("paramName", "The paramName cannot be null or empty.");
     }
 }
 internal static T GetUnboundValue <T>(this PSCmdlet cmdlet, int unnamedPosition)
 {
     return(cmdlet.GetUnboundValue <T>(String.Empty, unnamedPosition));
 }
 internal static T GetUnboundValue <T>(this PSCmdlet cmdlet, string paramName)
 {
     return(cmdlet.GetUnboundValue <T>(paramName, -1));
 }