|
13 | 13 | ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄ |
14 | 14 | █████████████████████████████████████████████████████████████ ███████████████ ██ ██ ██ ████ ██ ██ ████████████████ █ █ |
15 | 15 | ▄ |
16 | | - █ Provides static methods used to retrieve the command line arguments with which the application was started. |
| 16 | + █ Provides static methods used to retrieve the command line arguments and operands with which the application was started, |
| 17 | + █ as well as a Type to contain them. |
17 | 18 | █ |
18 | 19 | █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀ ▀▀ ▀ |
19 | 20 | █ The MIT License (MIT) |
@@ -119,7 +120,8 @@ public ArgumentAttribute(char shortName, string longName) |
119 | 120 | } |
120 | 121 |
|
121 | 122 | /// <summary> |
122 | | - /// Provides static methods used to retrieve the command line arguments with which the application was started. |
| 123 | + /// Provides static methods used to retrieve the command line arguments and operands with which the application was |
| 124 | + /// started, as well as a Type to contain them. |
123 | 125 | /// </summary> |
124 | 126 | public class Arguments |
125 | 127 | { |
@@ -258,15 +260,14 @@ public static void Populate(Dictionary<string, string> argumentDictionary) |
258 | 260 | /// The Type for which the static properties matching the list of command line arguments are to be populated. |
259 | 261 | /// </param> |
260 | 262 | /// <param name="arguments"> |
261 | | - /// The arguments object containing the dictionary containing the argument-value pairs with which the destination |
| 263 | + /// The Arguments object containing the dictionary containing the argument-value pairs with which the destination |
262 | 264 | /// properties should be populated and the list of operands. |
263 | 265 | /// </param> |
264 | 266 | public static void Populate(Type type, Arguments arguments) |
265 | 267 | { |
266 | 268 | // fetch any properties in the specified type marked with the ArgumentAttribute attribute |
267 | 269 | Dictionary<string, PropertyInfo> properties = GetArgumentProperties(type); |
268 | 270 |
|
269 | | - // iterate over the property dictionary |
270 | 271 | foreach (string propertyName in properties.Keys) |
271 | 272 | { |
272 | 273 | // if the argument dictionary contains a matching argument |
@@ -423,7 +424,7 @@ private static List<string> GetOperands(string commandLineString) |
423 | 424 |
|
424 | 425 | foreach (Match match in Regex.Matches(commandLineString, ArgumentRegEx)) |
425 | 426 | { |
426 | | - // the 4th match of the regular expression used to parse the string will contain the operand, if one was matched. |
| 427 | + // the 3rd match of the regular expression used to parse the string will contain the operand, if one was matched. |
427 | 428 | if (match.Groups[3].Value == default(string) || match.Groups[3].Value == string.Empty) |
428 | 429 | { |
429 | 430 | continue; |
|
0 commit comments