public UIJobResult(Exception exception) { if (exception == null) { throw new ArgumentNullException("Exception cannot be null. Use different constructor if necessary."); } JobResult = eUIJobResult.Exception; Exception = exception; }
public UIJobResult(eUIJobResult result) { if (result == eUIJobResult.Exception) { throw new ArgumentException("If result is exception, use constructor with exception parameter."); } JobResult = result; Exception = null; }