Ejemplo n.º 1
0
        private void OnLoginChange()
        {
            if (OnlineChanged != null)
            {
                Delegate[] invkList = OnlineChanged.GetInvocationList();
                Console.WriteLine("[Authentication] Notifying {0} Clients", invkList.Length);

                foreach (OnlineHandler handler in invkList)
                {
                    new Thread(() =>
                    {
                        try
                        {
                            handler(GetOnline());
                        }
                        catch (Exception)
                        {
                            OnlineChanged -= handler;
                        }
                    }).Start();
                }
            }
        }
Ejemplo n.º 2
0
 public void Repeater(List <User> users)
 {
     OnlineChanged?.Invoke(users);
 }
 protected void OnOnlineChanged(bool status)
 {
     IsOnline = status;
     OnlineChanged?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 4
0
 protected void OnOnlineChanged(bool status)
 {
     IsOnline = status;
     OnlineChanged?.Invoke(this, EventArgs.Empty);
     _logger.LogInformation("Status changed to {online}", status);
 }