/// <summary>
 /// The uninstall handler.
 /// </summary>
 public override void Uninstall(System.Collections.IDictionary savedState)
 {
     Counters.Uninstall();
     base.Uninstall(savedState);
 }
Example #2
0
            public AsynchronousResult(AsyncCallback completionCallback, object state, IDictionary <RelayMessage, Future> asyncMessages, Counters counters)
            {
                if (asyncMessages.Count == 0)
                {
                    throw new ArgumentException("Cannot start an aynchronous operation with no messages.", "asyncMessages");
                }
                _completionCallback = completionCallback;
                _state         = state;
                _asyncMessages = asyncMessages;
                _counters      = counters;

                if (asyncMessages.Any(message => !message.Value.IsComplete))
                {
                    _completedSynchrononously = false;
                }

                foreach (var message in asyncMessages)
                {
                    try
                    {
                        message.Value
                        .OnSuccess(FutureCallback)
                        .OnError(ErrorCallback);
                    }
                    catch (Exception ex)
                    {
                        FrequencyBoundLogError(String.Format("Unexpected Exception occurred while connection reactions to Flex Futures.  Exception: {0}", ex));
                        ErrorCallback(ex);
                    }
                }
            }
 /// <summary>
 /// The Install handler.
 /// </summary>
 public override void Install(System.Collections.IDictionary stateSaver)
 {
     Counters.Install();
     base.Install(stateSaver);
 }