Exemplo n.º 1
0
        /// <summary>
        /// Complete the promise. Adds a defualt error handler.
        /// </summary>
        public void Done()
        {
            var resultFpromise = new Fpromise();

            resultFpromise.WithName(Name);

            ActionHandlers(resultFpromise,
                           () =>
            {
            },
                           ex => Fpromise.PropagateUnhandledException(this, ex)
                           );
        }
Exemplo n.º 2
0
        /// <summary>
        /// Completes the promise.
        /// onResolved is called on successful completion.
        /// Adds a default error handler.
        /// </summary>
        public void Done(Action onResolved)
        {
            //            Argument.NotNull(() => onResolved);

            var resultFpromise = new Fpromise();

            resultFpromise.WithName(Name);

            ActionHandlers(resultFpromise,
                           onResolved,
                           ex => Fpromise.PropagateUnhandledException(this, ex)
                           );
        }