コード例 #1
0
 public InvokeReactorQueueRequest(MethodInfo method, object[] arguments, DeferredObject returnedDeferred, object implementation)
 {
     _method = method;
     _arguments = arguments;
     _returnedDeferred = returnedDeferred;
     _implementation = implementation;
 }
コード例 #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();
            }
        }
コード例 #3
0
 public void ObjectCompletion(DeferredObject nextOrNull)
 {
     ObjectCompletion(IdentityCallback, IdentityFailback, nextOrNull);
 }
コード例 #4
0
 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;
         }
     }
 }
コード例 #5
0
 public static object ShowIndefinite(DeferredObject deferred, string statusMessage, string successMessage)
 {
     return ShowIndefinite(deferred, statusMessage, successMessage, RemoteExceptionForm.ShowFailureModal);
 }
コード例 #6
0
 public static object ShowIndefinite(DeferredObject deferred, string statusMessage)
 {
     return ShowIndefinite(deferred, statusMessage, null);
 }
コード例 #7
0
 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);
         }
     }
 }
コード例 #8
0
 public RemotingRequestToken(RemotingRequest request, DeferredObject deferred, Type returnType)
 {
     _request = request;
     _deferred = deferred;
     _returnType = returnType;
 }