コード例 #1
0
 public dynamic ParseString(ArgumentInfo argumentInfo, string value)
 {
     try
     {
         return(_argumentTypeDescriptor.ParseString(argumentInfo, value));
     }
     catch (FormatException)
     {
         throw new ValueParsingException(
                   $"'{value}' is not a valid {_argumentTypeDescriptor.GetDisplayName(argumentInfo)}");
     }
     catch (ArgumentException)
     {
         throw new ValueParsingException(
                   $"'{value}' is not a valid {_argumentTypeDescriptor.GetDisplayName(argumentInfo)}");
     }
 }
コード例 #2
0
 public string GetDisplayName(IArgument argument)
 {
     return(_innerDescriptor.GetDisplayName(argument));
 }