示例#1
0
        /// <summary>
        /// Perform the given call on all the connected clients
        /// </summary>
        /// <param name="remoteCall">Details of the call</param>
        public static void BroadcastExecuteOnClient(ClientCall remoteCall)
        {
            if (remoteCall == null)
            {
                throw new ArgumentNullException("remoteCall");
            }

            //Send message to everyone
            SseHelper.BroadCastMessage(remoteCall);
        }
示例#2
0
 /// <summary>
 /// Execute the given call on the client
 /// </summary>
 /// <param name="remoteCall">The details of the call</param>
 /// <param name="raiseEventOnError">if false, no event will be raised if there is a communications problem</param>
 public static void ExecuteOnClient(ClientCall remoteCall, bool raiseEventOnError = true)
 {
     if (remoteCall == null)
     {
         throw new ArgumentNullException("remoteCall");
     }
     if (!SseHelper.SendMessage(remoteCall, raiseEventOnError) && !raiseEventOnError)
     {
         //inform the user who made the call
         RemoteExecutionController.RaiseConnectionLostEvent(remoteCall);
     }
 }
示例#3
0
 /// <summary>
 /// determines if the client is online
 /// </summary>
 /// <param name="clientId">id of the client to check</param>
 public static bool ClientIsOnLine(string clientId)
 {
     return(SseHelper.ClientIsOnLine(clientId));
 }