private async Task GetEventsAsync() { EventList.Clear(); if (!_connectionHandler.IsConnected()) { EventList.Add(new WifiEventRow("You are not logged in!")); return; } var session = _connectionHandler.GetSession(); var events = await _getWifiEventsService.GetEvents(session, session.ObjectId); if (events.ResponseStatus != RestResponseStatus.Ok) { EventList.Add(new WifiEventRow("Error connecting to the backend services!")); return; } foreach (WifiEvent wifiEvent in events.WifiEvents) { EventList.Add(new WifiEventRow(wifiEvent.ToString())); } }
private void WifiStateChanged(object?sender, WifiStateChangedArguments e) { _ = _postWifiEventService.PostWifiEvent(_connectionHandler.GetSession(), new WifiEvent(e.EventType)); }