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

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

                var callback = value as DuplexCallback;

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

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