public ForgotPasswordRepository(IRestServices restServices, IRxSchedulersFacade rxSchedulersFacade, IDeviceLog log) { _restServices = restServices; _rxSchedulersFacade = rxSchedulersFacade; _log = log; }
public ResetPassDialog(Context context, IAppRes appRes, IDeviceLog log, IForgotPasswordViewModel viewModel) : base(context, appRes, log) { _viewModel = viewModel; if (_viewModel is IBaseViewModel vm) { SubscribeToastDialog(vm); } }
public AuthRepository(IRestServices restServices, IAuthService authService, IRxSchedulersFacade rxSchedulersFacade, IConnectionStatusRepository connectionStatusRepository, IDeviceLog log) { _restServices = restServices; _authService = authService; _rxSchedulersFacade = rxSchedulersFacade; _connectionStatusRepository = connectionStatusRepository; _log = log; }
public MainViewModel(IAppRes appRes, IRxSchedulersFacade rxSchedulersFacade, IDeviceLog deviceLog, IAuthRepository authRepository) : base(appRes, rxSchedulersFacade, deviceLog) { _authRepository = authRepository; RxDisposables.Add(authRepository.AuthStatus .ObserveOn(RxSchedulersFacade.IO()) .SubscribeOn(RxSchedulersFacade.IO()) .Subscribe(status => AuthStatus.PostValue(status), exception => Log.Error("MainViewModel", "Error observing AuthRepository AuthStatus", exception))); }
public override void OnActivityCreated(Bundle savedInstanceState) { base.OnActivityCreated(savedInstanceState); if (Activity is IBaseFragmentContract contract) { Log = contract.GetDeviceLog(); AppRes = contract.GetAppRes(); } else { throw new Exception("Context not implementing IBaseFragmentContract"); } ApplyI18N(); }
public AppRes(IDeviceStorageRepository deviceStorageRepository, IDeviceLog deviceLog) { _deviceStorageRepository = deviceStorageRepository; _log = deviceLog; I18N.Current.SetResourcesFolder("Resources.Locales") .SetFallbackLocale("en") .SetNotFoundSymbol("$") .SingleFileResourcesMode() .SetSingleFileLocaleReader(new CsvColSingleFileReader(), ".csv") .Init(GetType().Assembly); var savedLocale = ReadLocale(); if (!savedLocale.Equals(LangCode)) { I18N.Current.Locale = savedLocale; } }
public SplashViewModel(IAppRes appRes, IRxSchedulersFacade rxSchedulersFacade, IDeviceLog deviceLog, IAuthRepository authRepository) : base(appRes, rxSchedulersFacade, deviceLog) { _authRepository = authRepository; RxDisposables.Add(_authRepository.AuthStatus .ObserveOn(RxSchedulersFacade.IO()) .SubscribeOn(RxSchedulersFacade.IO()) .Subscribe(status => { if (status == AuthStatusEnum.LoggedOut) { StartupLiveData.PostValue(AppStartStatus.LoginRequired); } else if (status == AuthStatusEnum.NoInternet) { StartupLiveData.PostValue(AppStartStatus.NoInternet); } }, e => { StartupLiveData.PostValue(AppStartStatus.LoginRequired); Log.Error("SplashViewModel", "error subscribing to AuthStatus", e); })); }
public ForgotPasswordViewModel(IAppRes appRes, IRxSchedulersFacade rxSchedulersFacade, IDeviceLog deviceLog, IForgotPasswordRepository forgotPasswordRepository) : base(appRes, rxSchedulersFacade, deviceLog) { _forgotPasswordRepository = forgotPasswordRepository; RxDisposables.Add(_forgotPasswordRepository.ForgotPasswordRequestStatusSubject .SubscribeOn(RxSchedulersFacade.IO()) .ObserveOn(RxSchedulersFacade.UI()) .Subscribe(HandleNewForgotPasswordRequestStatus, e => { LongToast(AppRes["ForgotPasswordError"]); Log.Error("ForgotPasswordPageViewModel", "error subscribing to ForgotPasswordRequestStatusSubject", e); } )); }
protected BaseCustomDialog(Context context, IAppRes appRes, IDeviceLog log, int themeResId) : base(context, themeResId) { AppRes = appRes; Log = log; }
protected BaseCustomDialog(Context context, IAppRes appRes, IDeviceLog log) : base(context) { AppRes = appRes; Log = log; }
protected BaseViewModel(IAppRes appRes, IRxSchedulersFacade rxSchedulersFacade, IDeviceLog deviceLog) { AppRes = appRes; RxSchedulersFacade = rxSchedulersFacade; Log = deviceLog; }
public ConnectionStatusRepository(Context appContext, IDeviceLog log) { _log = log; _connectivityManager = (ConnectivityManager)appContext.GetSystemService(Context.ConnectivityService); }
public ConnectionStatusRepository(IDeviceLog log) { _log = log; }