Skip to content

Commit b971dcc

Browse files
committed
Code cleanup
1 parent 2de01c9 commit b971dcc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Utility.CommandLine.Arguments/Arguments.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄
1414
█████████████████████████████████████████████████████████████ ███████████████ ██ ██ ██ ████ ██ ██ ████████████████ █ █
1515
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.
1718
1819
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀ ▀▀ ▀
1920
█ The MIT License (MIT)
@@ -119,7 +120,8 @@ public ArgumentAttribute(char shortName, string longName)
119120
}
120121

121122
/// <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.
123125
/// </summary>
124126
public class Arguments
125127
{
@@ -258,15 +260,14 @@ public static void Populate(Dictionary<string, string> argumentDictionary)
258260
/// The Type for which the static properties matching the list of command line arguments are to be populated.
259261
/// </param>
260262
/// <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
262264
/// properties should be populated and the list of operands.
263265
/// </param>
264266
public static void Populate(Type type, Arguments arguments)
265267
{
266268
// fetch any properties in the specified type marked with the ArgumentAttribute attribute
267269
Dictionary<string, PropertyInfo> properties = GetArgumentProperties(type);
268270

269-
// iterate over the property dictionary
270271
foreach (string propertyName in properties.Keys)
271272
{
272273
// if the argument dictionary contains a matching argument
@@ -423,7 +424,7 @@ private static List<string> GetOperands(string commandLineString)
423424

424425
foreach (Match match in Regex.Matches(commandLineString, ArgumentRegEx))
425426
{
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.
427428
if (match.Groups[3].Value == default(string) || match.Groups[3].Value == string.Empty)
428429
{
429430
continue;

0 commit comments

Comments
 (0)