/// <summary> /// Creates a Success NotificationResult /// </summary> /// <param name="notificatorContext">the instance of the notificator context</param> /// <returns>An instance of notification result</returns> public static NotificationResult Success(NotificatorContext notificatorContext) { var result = new NotificationResult(notificatorContext); result.Result = Result.Success; return(result); }
/// <summary> /// Creates a Fail NotificationResult /// </summary> /// <param name="notificatorContext">the instance of the notificator context</param> /// <param name="exceptions">the exceptions occurred on the operation</param> /// <returns>An instance of notification result</returns> public static NotificationResult Fail(NotificatorContext notificatorContext, params Exception[] exceptions) { var result = new NotificationResult(notificatorContext); result.Result = Result.Fail; result.Exceptions = exceptions; return(result); }