public void Reset()
 {
     // A try..catch block may be required, though Rx doesn't call the Reset method at all.
     try
     {
         sink.ResetEnumerator(name, enumeratorId);
     }
     catch (Exception ex)
     {
         protocol.CancelAllCommunication(ExceptionDispatchInfo.Capture(ex));
     }
 }
Exemple #2
0
        public TResult ServerInvoke <TResult>(object[] arguments)
        {
            Contract.Requires(IsInitialized);

            try
            {
                var value = (TResult)sink.Invoke(Name, Id, arguments);

                var callback = value as DuplexCallback;

                if (callback != null)
                {
                    callback.sink = sink;
                }

                return(value);
            }
            catch (Exception ex)
            {
                protocol.CancelAllCommunication(ExceptionDispatchInfo.Capture(ex));
                throw;
            }
        }