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(); } } }
public void Repeater(List <User> users) { OnlineChanged?.Invoke(users); }
protected void OnOnlineChanged(bool status) { IsOnline = status; OnlineChanged?.Invoke(this, EventArgs.Empty); }
protected void OnOnlineChanged(bool status) { IsOnline = status; OnlineChanged?.Invoke(this, EventArgs.Empty); _logger.LogInformation("Status changed to {online}", status); }