Exemplo n.º 1
0
 public bool Subscribe(ServiceClient clientData)
 {
     // TODO Unsubscribe client after some amount of time no ping
     clientData.Callback =
         OperationContext.Current.GetCallbackChannel<IEveAPIService>();
     return RelayManager.RegisterClient(clientData);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Registers new Service Client
        /// </summary>
        /// <param name="client">Service Client object to register</param>
        /// <returns>
        /// Returns true if Service Client isn't 
        /// already registered nor null
        /// </returns>
        public static bool RegisterClient(ServiceClient client)
        {
            if (client == null ||
                RelayManager.Clients.ContainsKey(client.ID))
                return false;

            RelayManager.Clients.Add(client.ID, client);
            return true;
        }
Exemplo n.º 3
0
 // TODO rename to Unsubscribe
 public bool Unsibscribe(ServiceClient clientData)
 {
     return RelayManager.UnregisterClient(clientData.ID);
 }