Exemplo n.º 1
0
        /// <summary>
        /// Invokes a method on the hub.
        /// </summary>
        /// <param name="grain"></param>
        /// <param name="methodName">Target method name to invoke.</param>
        /// <param name="args">Arguments to pass to the target method.</param>
        public static Task Send(this IHubMessageInvoker grain, string methodName, params object[] args)
        {
            var invocationMessage = new InvocationMessage(methodName, args);

            return(grain.Send(invocationMessage));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Invokes a method on the hub (one way).
 /// </summary>
 /// <param name="grain"></param>
 /// <param name="methodName">Target method name to invoke.</param>
 /// <param name="args">Arguments to pass to the target method.</param>
 public static void SendOneWay(this IHubMessageInvoker grain, string methodName, params object[] args)
 => grain.InvokeOneWay(g => g.Send(methodName, args));