SIL.FieldWorks.FieldWorks.TryCommandLineOption C# (CSharp) Метод

TryCommandLineOption() приватный статический Метод

Returns true if valid command-line args created this projectId. Returns false with no exception if no -db arg was given. Returns false with exception if invalid args were given.
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.
		}
FieldWorks