private static TryCommandLineOption ( ProjectId projId, StartupException &exception ) : bool | ||
projId | ProjectId | |
exception | StartupException | |
Результат | bool |
private static bool TryCommandLineOption(ProjectId projId, out StartupException exception)
{
exception = null;
if (string.IsNullOrEmpty(projId.Name))
return false;
var ex = projId.GetExceptionIfInvalid();
if (ex is StartupException)
{
exception = (StartupException) ex;
return false; // Invalid command-line arguments supplied.
}
if (ex == null)
return true; // If valid command-line arguments are supplied, we go with that.
throw ex; // Something totally unexpected happened, don't suppress it.
}