CommandLine/src/Program.cs
/// <summary>
/// Parses a value of an option
/// </summary>
/// <param name="value">The option prefix and the option value</param>
/// <returns>The value of an option</returns>
Parses a value of an option
Parses a value of an option
private static string ParseValue(string value) {
            foreach (string opAssignment in OptionsConfiguration.optionsAssignment)
                if (value.StartsWith(opAssignment))
                    return value.Substring(opAssignment.Length, value.Length - opAssignment.Length);
            Console.Error.WriteLine(OptionsConfiguration.errorMessage);
            System.Environment.Exit(2);  
            return null;
        }
private static string ParseValue ( string value ) { foreach ( string opAssignment in OptionsConfiguration . optionsAssignment ) if ( value . StartsWith ( opAssignment ) ) return value . Substring ( opAssignment . Length , value . Length - opAssignment . Length ) ; Console . Error . WriteLine ( OptionsConfiguration . errorMessage ) ; System . Environment . Exit ( 2 ) ; return null ; }
Parses a value of an option
Parses a value of an option
// * Option prefix // * If the method has not returned, an error exists // 2 == Bad option assignment
The value of an option
The value of an option
value
string
The option prefix and the option value
The option prefix and the option value