コード例 #1
0
 public WampClientRouterCallbackAdapter(IWampRawRpcOperationClientCallback caller, InvocationDetails options)
 {
     mCaller   = caller;
     mNotifier = mCaller as ICallbackDisconnectionNotifier;
     mNotifier.Disconnected += OnDisconnected;
     mOptions = options;
 }
コード例 #2
0
 public CallDetails(IWampRawRpcOperationClientCallback caller, CallOptions options, string procedure, object[] arguments = null, IDictionary <string, object> argumentsKeywords = null)
 {
     mCaller            = caller;
     mOptions           = options;
     mProcedure         = procedure;
     mArguments         = arguments;
     mArgumentsKeywords = argumentsKeywords;
 }
コード例 #3
0
        protected override void Invoke(ICalleeProxyInterceptor interceptor, IWampRawRpcOperationClientCallback callback, MethodInfo method, object[] arguments)
        {
            CallOptions callOptions  = interceptor.GetCallOptions(method);
            var         procedureUri = interceptor.GetProcedureUri(method);

            mCatalogProxy.Invoke(callback,
                                 callOptions,
                                 procedureUri,
                                 arguments);
        }
コード例 #4
0
 /// <summary>
 /// Invokes the request procedure with the given parameters.
 /// </summary>
 /// <param name="invoker">The given <see cref="IWampRpcOperationInvoker"/>.</param>
 /// <param name="caller">The callback that will be called when a result or error is available.</param>
 /// <param name="formatter">A formatter that can be used to deserialize given arguments.</param>
 /// <param name="details">The details associated with this call.</param>
 /// <param name="procedure">The procedure to invoke.</param>
 /// <typeparam name="TMessage"></typeparam>
 public static void Invoke <TMessage>(this IWampRpcOperationInvoker invoker,
                                      IWampRawRpcOperationClientCallback caller,
                                      IWampFormatter <TMessage> formatter,
                                      InvocationDetails details,
                                      string procedure)
 {
     invoker.Invoke(new WampClientRouterCallbackAdapter(caller, details),
                    formatter,
                    details,
                    procedure);
 }
コード例 #5
0
        public void Invoke(IWampRawRpcOperationClientCallback caller, CallOptions options, string procedure, object[] arguments, IDictionary <string, object> argumentsKeywords)
        {
            if (!IsConnected)
            {
                throw new WampSessionNotEstablishedException();
            }

            CallDetails callDetails = new CallDetails(caller, options, procedure, arguments, argumentsKeywords);

            long requestId = RegisterCall(callDetails);

            mProxy.Call(requestId, options, procedure, arguments, argumentsKeywords);
        }
コード例 #6
0
ファイル: WampCaller.cs プロジェクト: tracyharton/WampSharp
        public IWampCancellableInvocationProxy Invoke(IWampRawRpcOperationClientCallback caller, CallOptions options, string procedure, object[] arguments)
        {
            if (!IsConnected)
            {
                throw new WampSessionNotEstablishedException();
            }

            CallDetails callDetails = new CallDetails(caller, options, procedure, arguments);

            long requestId = RegisterCall(callDetails);

            mProxy.Call(requestId, options, procedure, arguments);

            return(new WampCancellableInvocationProxy(mProxy, requestId));
        }
コード例 #7
0
 /// <summary>
 /// Invokes the request procedure with the given parameters.
 /// </summary>
 /// <param name="invoker">The given <see cref="IWampRpcOperationInvoker"/>.</param>
 /// <param name="caller">The callback that will be called when a result or error is available.</param>
 /// <param name="formatter">A formatter that can be used to deserialize given arguments.</param>
 /// <param name="details">The details associated with this call.</param>
 /// <param name="procedure">The procedure to invoke.</param>
 /// <param name="arguments">The arguments associated with this call.</param>
 /// <param name="argumentsKeywords">The arguments keywords associated with this call.</param>
 /// <typeparam name="TMessage"></typeparam>
 public static void Invoke <TMessage>(this IWampRpcOperationInvoker invoker,
                                      IWampRawRpcOperationClientCallback caller,
                                      IWampFormatter <TMessage> formatter,
                                      InvocationDetails details,
                                      string procedure,
                                      TMessage[] arguments,
                                      IDictionary <string, TMessage> argumentsKeywords)
 {
     invoker.Invoke(new WampClientRouterCallbackAdapter(caller, details),
                    formatter,
                    details,
                    procedure,
                    arguments,
                    argumentsKeywords);
 }
コード例 #8
0
        private void CallPattern(IWampCaller caller, long requestId, CallOptions options, string procedure, Action <IWampRpcOperationInvoker, IWampRawRpcOperationClientCallback, InvocationDetails> invokeAction)
        {
            try
            {
                IWampRawRpcOperationClientCallback callback = GetCallback(caller, requestId);

                InvocationDetails invocationOptions =
                    GetInvocationOptions(caller, options, procedure);

                ValidateCallUri(procedure);

                invokeAction(mInvoker, callback, invocationOptions);
            }
            catch (WampException ex)
            {
                caller.CallError(requestId, ex);
            }
        }
コード例 #9
0
 public MockRpcOperationRouterCallback(IWampRawRpcOperationClientCallback caller)
 {
     this.caller = caller;
 }
コード例 #10
0
 public IWampCancellableInvocationProxy Invoke(IWampRawRpcOperationClientCallback caller, CallOptions options, string procedure, object[] arguments, IDictionary <string, object> argumentsKeywords)
 {
     return(mCaller.Invoke(caller, options, procedure, arguments, argumentsKeywords));
 }
コード例 #11
0
 public IWampCancellableInvocationProxy Invoke(IWampRawRpcOperationClientCallback caller, CallOptions options, string procedure)
 {
     return(mCaller.Invoke(caller, options, procedure));
 }
コード例 #12
0
 protected abstract void Invoke(ICalleeProxyInterceptor interceptor, IWampRawRpcOperationClientCallback callback, MethodInfo method, object[] arguments);
コード例 #13
0
 public void Invoke(IWampRawRpcOperationClientCallback caller, CallOptions options, string procedure, object[] arguments, IDictionary <string, object> argumentsKeywords)
 {
     mCaller.Invoke(caller, options, procedure, arguments, argumentsKeywords);
 }
コード例 #14
0
 public void Invoke(IWampRawRpcOperationClientCallback caller, CallOptions options, string procedure, object[] arguments)
 {
     mCaller.Invoke(caller, options, procedure, arguments);
 }
コード例 #15
0
 public void Invoke(IWampRawRpcOperationClientCallback caller, CallOptions options, string procedure)
 {
     mCaller.Invoke(caller, options, procedure);
 }