/// <summary> /// Initializes a new instance of the <see cref="RequestHeaderHelper"/> class. /// </summary> /// <param name="systemSettingsStore"></param> /// <param name="configuration"></param> public RequestHeaderHelper( ISystemSettingsStore systemSettingsStore, IEmConfiguration configuration) { this.systemSettingsStore = systemSettingsStore; this.configuration = configuration; }
/// <summary> /// Initializes a new instance of the <see cref="LocalizerViewModel"/> class. /// </summary> /// <param name="navigationService"></param> /// <param name="systemSettingsStore"></param> /// <param name="localizer"></param> public LocalizerViewModel( INavigationService navigationService, ISystemSettingsStore systemSettingsStore, ILocalizer localizer) : base(navigationService, systemSettingsStore, localizer) { }
/// <summary> /// Initializes a new instance of the <see cref="ForgotPasswordViewModel"/> class. /// </summary> /// <param name="navigationService"></param> /// <param name="systemSettingsStore"></param> /// <param name="authenticationStore"></param> /// <param name="localizer"></param> public ForgotPasswordViewModel( INavigationService navigationService, ISystemSettingsStore systemSettingsStore, IAuthenticationStore authenticationStore, ILocalizer localizer) : base(navigationService, systemSettingsStore, localizer) { this.AuthenticationStore = authenticationStore; this.SubmitForgotPasswordFormCommand = new DelegateCommand(async() => await this.SubmitForgotPasswordFormAsync()); }
/// <summary> /// Initializes a new instance of the <see cref="ViewModelBase"/> class. /// </summary> /// <param name="navigationService"></param> /// <param name="systemSettingsStore"></param> /// <param name="localizer"></param> public ViewModelBase( INavigationService navigationService, ISystemSettingsStore systemSettingsStore, ILocalizer localizer) { this.NavigationService = navigationService; this.SystemSettingsStore = systemSettingsStore; this.SystemSettingsStore.LanguageChanged += this.OnLanguageChanged; this.Localizer = localizer; }
/// <summary> /// Initializes a new instance of the <see cref="RegisterViewModel"/> class. /// </summary> /// <param name="navigationService"></param> /// <param name="systemSettingsStore"></param> /// <param name="authenticationStore"></param> /// <param name="localizer"></param> public RegisterViewModel( INavigationService navigationService, ISystemSettingsStore systemSettingsStore, IAuthenticationStore authenticationStore, ILocalizer localizer) : base(navigationService, systemSettingsStore, localizer) { this.AuthenticationStore = authenticationStore; this.GoToLoginPageCommand = new DelegateCommand(() => this.NavigationService.NavigateAsync("LoginPage")); this.SubmitRegistrationCommand = new DelegateCommand(async() => await this.SubmitRegistrationAsync()); }
/// <summary> /// Initializes a new instance of the <see cref="LoginViewModel"/> class. /// </summary> /// <param name="navigationService"></param> /// <param name="systemSettingsStore"></param> /// <param name="authenticationStore"></param> /// <param name="localizer"></param> public LoginViewModel( INavigationService navigationService, ISystemSettingsStore systemSettingsStore, IAuthenticationStore authenticationStore, ILocalizer localizer) : base(navigationService, systemSettingsStore, localizer) { this.AuthenticationStore = authenticationStore; this.GoToForgotPasswordPageCommand = new DelegateCommand(() => this.NavigationService.NavigateAsync("ForgotPasswordPage")); this.GoToRegisterPageCommand = new DelegateCommand(() => this.NavigationService.NavigateAsync("RegisterPage")); this.SubmitLoginCommand = new DelegateCommand(async() => await this.SubmitLoginAsync()); this.LoginModel = new LoginFormModel(); }
/// <summary> /// Initializes a new instance of the <see cref="AccountViewModel"/> class. /// </summary> /// <param name="navigationService"></param> /// <param name="systemSettingsStore"></param> /// <param name="localizer"></param> /// <param name="authenticationStore"></param> /// <param name="configuration"></param> public AccountViewModel( INavigationService navigationService, ISystemSettingsStore systemSettingsStore, ILocalizer localizer, IAuthenticationStore authenticationStore, IEmConfiguration configuration) : base(navigationService, systemSettingsStore, localizer) { this.AuthenticationStore = authenticationStore; this.Configuration = configuration; this.GoToLoginPageCommand = new DelegateCommand(() => this.NavigationService.NavigateAsync("LoginPage")); this.GoToRegisterPageCommand = new DelegateCommand(() => this.NavigationService.NavigateAsync("RegisterPage")); this.LoginWithFacebookCommand = new DelegateCommand(() => this.LoginWithFacebook()); this.LoginWithGoogleCommand = new DelegateCommand(() => this.LoginWithGoogle()); }
/// <summary> /// Register default Emeraude localizer service. /// </summary> /// <param name="containerRegistry"></param> /// <param name="resourceManager"></param> /// <param name="systemSettingsStore"></param> /// <returns></returns> public static IContainerRegistry RegisterEmeraudeLocalizer(this IContainerRegistry containerRegistry, ResourceManager resourceManager, ISystemSettingsStore systemSettingsStore) { containerRegistry.RegisterInstance <ILocalizer>(new Localizer(resourceManager, systemSettingsStore)); containerRegistry.RegisterSingleton <LocalizerViewModel>(); return(containerRegistry); }
/// <summary> /// Initializes a new instance of the <see cref="Localizer"/> class. /// </summary> /// <param name="resourceManager"></param> /// <param name="systemSettingsStore"></param> public Localizer(ResourceManager resourceManager, ISystemSettingsStore systemSettingsStore) { this.resourceManager = resourceManager; this.systemSettingsStore = systemSettingsStore; this.systemSettingsStore.LanguageChanged += this.SystemSettingsStoreLanguageChanged; }