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
| Name | Type | Description |
|---|---|---|
result | int | The 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
| Name | Type | Description |
|---|---|---|
argument | string | The argument to search for (e.g., -force-subject-id). |
result | T | The 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
| Name | Type | Description |
|---|---|---|
T | The type to which the argument value should be converted. |