예제 #1
0
 public OrganizationController(IUnitOfWork unitOfWork,
                               LocalizerService localizerService,
                               IMapper mapper)
 {
     _unitOfWork       = unitOfWork;
     _localizerService = localizerService;
     _mapper           = mapper;
 }
 public UserController(UserManager <UserApp> userManager,
                       RoleManager <ApplicationRole> roleManager,
                       LocalizerService localizerService)
 {
     _userManager      = userManager;
     _roleManager      = roleManager;
     _localizerService = localizerService;
 }
 public AccountController(UserManager <UserApp> userManager,
                          RoleManager <ApplicationRole> roleManager,
                          SignInManager <UserApp> signInManager,
                          LocalizerService localizerService)
 {
     _userManager      = userManager;
     _roleManager      = roleManager;
     _signInManager    = signInManager;
     _localizerService = localizerService;
 }
예제 #4
0
        /// <summary>
        ///     ConfigureSupportedCulturesAndLocalizationOptions
        ///     https://github.com/aspnet/Entropy/blob/dev/samples/Localization.StarterWeb/Startup.cs
        ///     https://joonasw.net/view/aspnet-core-localization-deep-dive
        /// </summary>
        private static void ConfigureLocalizerService(IServiceCollection services)
        {
            var localizer = new LocalizerService();

            if (localizer.Configured)
            {
                return;
            }
            services.AddSingleton <ILocalizerService, LocalizerService>(c => localizer);
            services.Configure <RequestLocalizationOptions>(localizer.Configure);
        }
예제 #5
0
 public TemplateRepository(LocalizerService localizerService)
 {
     _localizerService = localizerService;
 }
예제 #6
0
 public HomeController(LocalizerService localizerService)
 {
     _localizerService = localizerService;
 }