Skip to main content

Class CommandLineHelper

Provides helper methods for parsing command line arguments, such as retrieving the subject ID.

public class CommandLineHelper

Inheritance​

Methods​

TryParseSubjectIDFromCommandLine(out int)​

Attempts to retrieve the subject ID from the command line arguments.

public static bool TryParseSubjectIDFromCommandLine(out int result)

Parameters​

NameTypeDescription
resultintThe subject ID extracted from the command line arguments (if present).

Returns​

bool — True if the subject ID was found and successfully parsed, otherwise false.

TryyParseArgument<T>(string, out T)​

Tries to retrieve a specific argument from the command line arguments and convert it to the specified type.

public static bool TryyParseArgument<T>(string argument, out T result)

Parameters​

NameTypeDescription
argumentstringThe argument to search for (e.g., -force-subject-id).
resultTThe value of the argument after conversion (if found and successfully parsed).

Returns​

bool — True if the argument was found and successfully parsed; otherwise, false.

Type Parameters​

NameTypeDescription
TThe type to which the argument value should be converted.
  • Methods
    • TryParseSubjectIDFromCommandLine(out int)
    • TryyParseArgument<T>(string, out T)