PWA Fundvelo der Caritas.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AppState.cs 579B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. namespace CaritasPWA.Shared {
  6. public class AppState {
  7. private bool _loggedIn;
  8. public event Action OnChange;
  9. public bool LoggedIn {
  10. get { return _loggedIn; }
  11. set {
  12. if (_loggedIn != value) {
  13. _loggedIn = value;
  14. NotifyStateChanged();
  15. }
  16. }
  17. }
  18. private void NotifyStateChanged() => OnChange?.Invoke();
  19. }
  20. }