public App(IUserRepository userRepository = null, IServerFinder serverFinder = null) { _serverFinder = serverFinder; _userRepository = userRepository ?? DependencyService.Get<IUserRepository>(); MainPage = _navigationPage = new NavigationPage(); if (_userRepository.IsLogged()) { _dashboardPage = new DashboardPage(_userRepository); _navigationPage.PushAsync(_dashboardPage); } else { var loginPage = new LoginPage(_userRepository); loginPage.Login += Login; loginPage.Register += Register; _navigationPage.PushAsync(loginPage); } }
public UserRepository(IServerFinder serverFinder = null) { _serverFinder = serverFinder ?? DependencyService.Get<IServerFinder>(); }
public RealTimeService(IServerFinder serverFinder = null) { _serverFinder = serverFinder ?? DependencyService.Get<IServerFinder>(); Task.Factory.StartNew(OpenConnection); }
public ValuesRepository(IServerFinder serverFinder = null, IUserRepository userRepository = null) { _serverFinder = serverFinder ?? DependencyService.Get<IServerFinder>(); _userRepository = userRepository ?? DependencyService.Get<IUserRepository>(); }