public InvokeReactorQueueRequest(MethodInfo method, object[] arguments, DeferredObject returnedDeferred, object implementation)
 {
     _method = method;
     _arguments = arguments;
     _returnedDeferred = returnedDeferred;
     _implementation = implementation;
 }
Example #2
0
        public void ObjectCompletion(ObjectCallback callback, ObjectFailback failback, DeferredObject nextOrNull)
        {
            if (callback == null) throw new ArgumentNullException("callback");
            if (failback == null) throw new ArgumentNullException("failback");

            if (_callback != null) throw new InvalidOperationException(
                "A completion callback has already been set on this deferred.");

            _callback = callback;
            _failback = failback;
            _next = nextOrNull;

            if (_completed)
            {
                RunBacks();
            }
        }
Example #3
0
 public void ObjectCompletion(DeferredObject nextOrNull)
 {
     ObjectCompletion(IdentityCallback, IdentityFailback, nextOrNull);
 }
 public static object ShowIndefinite(DeferredObject deferred, string statusMessage, string successMessage, Interlace.ReactorUtilities.VoidDeferred.Failback failback)
 {
     using (DeferredProgressBar form = new DeferredProgressBar())
     {
         form.OperationType = OperationType.MarqueeProgressBar;
         form.StatusMessage = statusMessage;
         form.DeferredObject = deferred;
         if (form.ShowDialog() == DialogResult.OK)
         {
             if (!string.IsNullOrEmpty(successMessage)) MessageBox.Show(successMessage, "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
             return form.SuccessObject;
         }
         else
         {
             failback(form.FailureObject);
             return form.FailureObject;
         }
     }
 }
 public static object ShowIndefinite(DeferredObject deferred, string statusMessage, string successMessage)
 {
     return ShowIndefinite(deferred, statusMessage, successMessage, RemoteExceptionForm.ShowFailureModal);
 }
 public static object ShowIndefinite(DeferredObject deferred, string statusMessage)
 {
     return ShowIndefinite(deferred, statusMessage, null);
 }
 public static Deferred<object> ChainIndefinite(DeferredObject deferred, string statusMessage)
 {
     using (DeferredProgressBar form = new DeferredProgressBar())
     {
         form.OperationType = OperationType.MarqueeProgressBar;
         form.StatusMessage = statusMessage;
         form.DeferredObject = deferred;
         if (form.ShowDialog() == DialogResult.OK)
         {
             return Deferred.Success(form.SuccessObject);
         }
         else
         {
             return Deferred.Failure<object>(form.FailureObject);
         }
     }
 }
 public RemotingRequestToken(RemotingRequest request, DeferredObject deferred, Type returnType)
 {
     _request = request;
     _deferred = deferred;
     _returnType = returnType;
 }