public TResult ServerInvoke <TResult>(object[] arguments)
        {
            Contract.Requires(sink != null);

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

            var callback = value as DuplexCallback;

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

            return(value);
        }
示例#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;
            }
        }
示例#3
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;
            }
        }