Пример #1
0
        public BleResultImpl(BleFailure failureCause, Exception innerException, params IBleResult[] nestedFailures)
        {
            FailureCause   = failureCause;
            InnerException = innerException;
            NestedFailures = nestedFailures;

            IsOperationCompleted = FailureCause == BleFailure.None && InnerException == null && !NestedFailures.Any(f => f != null && !f.IsOperationCompleted);
        }
Пример #2
0
 public static IBleResult Failure(BleFailure failureCause, IBleResult nestedFailure)
 {
     return(new BleResultImpl(failureCause, null, nestedFailure));
 }
Пример #3
0
 public static IBleResult <T> Failure <T>(BleFailure failureCause, Exception innerException = null)
 {
     return(new BleResultImpl <T>(default, Failure(failureCause, innerException)));
Пример #4
0
 public static IBleResult Failure(BleFailure failureCause, Exception innerException = null)
 {
     return(new BleResultImpl(failureCause, innerException));
 }