/// <summary>
 /// getInstance method to get an instance of the ViewModel
 /// </summary>
 /// <param name="uiStateModel"> Statemanager </param>
 /// <returns></returns>
 public static CreateSessionViewModel getInstance(UiStateModel uiStateModel)
 {
     if (instance == null)
     {
         instance = new CreateSessionViewModel(uiStateModel);
     }
     return(instance);
 }
 /// <summary>
 /// GetInstance Method
 /// </summary>
 /// <param name="uiStateModel"></param>
 /// <returns>An instance of GameLobbyViewModel </returns>
 public static GameLobbyViewModel getInstance(UiStateModel uiStateModel)
 {
     if (instance == null)
     {
         instance = new GameLobbyViewModel(uiStateModel);
     }
     return(instance);
 }
 /// <summary>
 /// getInstance method
 /// </summary>
 /// <param name="uiStateModel"></param>
 /// <returns>Instance of a GameEndViewModel</returns>
 public static GameEndViewModel getInstance(UiStateModel uiStateModel)
 {
     if (_instance == null)
     {
         _instance = new GameEndViewModel(uiStateModel);
     }
     return(_instance);
 }
 /// <summary>
 /// Standart constructor which sets the uiStateModel and listens to PropertyChanged
 /// Initializes the Taskfactory
 /// </summary>
 /// <param name="uiStateModel"></param>
 private CreateSessionViewModel(UiStateModel uiStateModel)
 {
     this.uiStateModel = uiStateModel;
     PropertyChanged  += shown;
     taskFactory       = new TaskFactory(TaskScheduler.FromCurrentSynchronizationContext());
 }
 /// <summary>
 /// Standart constructor
 /// </summary>
 /// <param name="uiStateModel"></param>
 private GameLobbyViewModel(UiStateModel uiStateModel)
 {
     taskFactory           = new TaskFactory(TaskScheduler.FromCurrentSynchronizationContext());
     this.uiStateModel     = uiStateModel;
     this.PropertyChanged += shown;
 }