public SectionViewModel() { _communication = ClassLoader.Instance.GetElement <ICommunication>(); _enviroment = ClassLoader.Instance.GetElement <IEnviroment>(); _database = ClassLoader.Instance.GetElement <IDatabase>(); AddCommand = new ClickCommand(OnAddCommand); token = _enviroment.UserToken; currentUser = _communication.GetUserDetails(token, new CancellationTokenSource().Token); }
public BooksViewModel() { AddCommand = new ClickCommand(OnAddCommand); AddCommand.SetCanExecuted(true); _communication = ClassLoader.Instance.GetElement <ICommunication>(); _enviroment = ClassLoader.Instance.GetElement <IEnviroment>(); _database = ClassLoader.Instance.GetElement <IDatabase>(); token = _enviroment.UserToken; currentUser = _communication.GetUserDetails(token, new CancellationTokenSource().Token); _database.GetBooks(currentUser.ID).ToList().ForEach(f => Books.Add(f)); }
public SignInViewModel() { SignIn = new ClickCommand(OnExecuted); _communication = ClassLoader.Instance.GetElement <ICommunication>(); _enviroment = ClassLoader.Instance.GetElement <IEnviroment>(); }