コード例 #1
0
        public LanguageAppService_Tests()
        {
            LoginAsHostAdmin();

            _languageAppService = Resolve<ILanguageAppService>();
            _languageManager = Resolve<IApplicationLanguageManager>();
        }
コード例 #2
0
        public LanguageAppService_Tests()
        {
            if (_multiTenancyEnabled)
            {
                LoginAsHostAdmin();
            }
            else
            {
                LoginAsDefaultTenantAdmin();
            }

            var fakeApplicationCulturesProvider = Substitute.For <IApplicationCulturesProvider>();

            fakeApplicationCulturesProvider.GetAllCultures().Returns(
                new CultureInfo[]
            {
                new CultureInfo("en"),
                new CultureInfo("tr"),
                new CultureInfo("zh-Hans"),
                new CultureInfo("en-US")
            });

            LocalIocManager.IocContainer.Register(Component.For <IApplicationCulturesProvider>()
                                                  .Instance(fakeApplicationCulturesProvider).IsDefault());

            _languageAppService = Resolve <ILanguageAppService>();
            _languageManager    = Resolve <IApplicationLanguageManager>();
        }
コード例 #3
0
        public LanguageAppService_Tests()
        {
            LoginAsHostAdmin();

            _languageAppService = Resolve <ILanguageAppService>();
            _languageManager    = Resolve <IApplicationLanguageManager>();
        }
コード例 #4
0
        public OpenAreaController(
            ICollaboratorAppService collaboratorPageAppService,
            IContactAppService contactAppService,
            IHomeAppService homeAppService,
            IHowToHelpAppService howToHelpAppService,
            ILanguageAppService languageAppService,
            ILogoAppService logoAppService,
            IMenuAppService menuAppService,
            IVolunteerAppService volunteerAppService,
            IWhoAreWeAppService whoAreWeAppService,
            IUrlHelper urlHelper)
        {
            _collaboratorPageAppService = collaboratorPageAppService;
            _contactAppService          = contactAppService;
            _homeAppService             = homeAppService;
            _howToHelpAppService        = howToHelpAppService;
            _languageAppService         = languageAppService;
            _logoAppService             = logoAppService;
            _menuAppService             = menuAppService;
            _volunteerAppService        = volunteerAppService;
            _whoAreWeAppService         = whoAreWeAppService;

            _languageEnricher = new LanguageEnricher(urlHelper);
            _logoEnricher     = new LogoEnricher(urlHelper);
            _menuEnricher     = new MenuEnricher(urlHelper);

            _collaboratorEnricher = new CollaboratorPageEnricher(urlHelper);
            _contactEnricher      = new ContactEnricher(urlHelper);
            _homeEnricher         = new HomeEnricher(urlHelper);
            _howToHelpEnricher    = new HowToHelpEnricher(urlHelper);
            _volunteerEnricher    = new VolunteerPageEnricher(urlHelper);
            _whoAreWeEnricher     = new WhoAreWeEnricher(urlHelper);
        }
コード例 #5
0
ファイル: LanguagesController.cs プロジェクト: a9512648/JYcms
 public LanguagesController(
     ILanguageAppService languageAppService,
     ILanguageManager languageManager,
     IApplicationLanguageTextManager applicationLanguageTextManager)
 {
     _languageAppService = languageAppService;
     _languageManager = languageManager;
     _applicationLanguageTextManager = applicationLanguageTextManager;
 }
コード例 #6
0
 public LanguagesController(
     ILanguageAppService languageAppService,
     ILanguageManager languageManager,
     IApplicationLanguageTextManager applicationLanguageTextManager)
 {
     _languageAppService             = languageAppService;
     _languageManager                = languageManager;
     _applicationLanguageTextManager = applicationLanguageTextManager;
 }
コード例 #7
0
        public async Task <PartialViewResult> CreateOrEditModal(int?id)
        {
            ILanguageAppService languageAppService = this._languageAppService;
            NullableIdInput     nullableIdInput    = new NullableIdInput()
            {
                Id = id
            };
            GetLanguageForEditOutput languageForEdit = await languageAppService.GetLanguageForEdit(nullableIdInput);

            return(this.PartialView("_CreateOrEditModal", new CreateOrEditLanguageModalViewModel(languageForEdit)));
        }
コード例 #8
0
 public LayoutController(
     IUserNavigationManager userNavigationManager,
     ILocalizationManager localizationManager,
     ISessionAppService sessionAppService,
     IMultiTenancyConfig multiTenancyConfig,
     ILanguageManager languageManager,
     ILanguageAppService languageAppService)
 {
     _userNavigationManager = userNavigationManager;
     _sessionAppService     = sessionAppService;
     _multiTenancyConfig    = multiTenancyConfig;
     _languageManager       = languageManager;
 }
コード例 #9
0
        //private readonly bool _multiTenancyEnabled = AppConsts.MultiTenancyEnabled;

        public LanguageAppService_Tests()
        {
            //if (_multiTenancyEnabled)
            //{
            //    LoginAsHostAdmin();
            //}
            //else
            //{
            //    LoginAsDefaultTenantAdmin();
            //}

            _languageAppService = Resolve <ILanguageAppService>();
            _languageManager    = Resolve <IApplicationLanguageManager>();
        }
コード例 #10
0
        public LanguageAppService_Tests()
        {
            if (TradeConsts.MultiTenancyEnabled)
            {
                LoginAsHostAdmin();
            }
            else
            {
                LoginAsDefaultTenantAdmin();
            }

            _languageAppService = Resolve <ILanguageAppService>();
            _languageManager    = Resolve <IApplicationLanguageManager>();
        }
コード例 #11
0
        public LanguageTextViewModel(ILanguageAppService appService, IApplicationContext context)
        {
            sources         = new ObservableCollection <string>();
            baseLanguages   = new ObservableCollection <LanguageStruct>();
            targetLanguages = new ObservableCollection <LanguageStruct>();

            input = new GetLanguageTextsInput()
            {
                FilterText     = "",
                MaxResultCount = AppConsts.DefaultPageSize,
                SkipCount      = 0
            };
            this.appService = appService;
            this.context    = context;
            EditCommand     = new DelegateCommand <LanguageTextListDto>(Edit);
            SearchCommand   = new DelegateCommand(Search);

            dataPager.OnPageIndexChangedEventhandler += LanguageOnPageIndexChangedEventhandler;
        }
コード例 #12
0
 public LanguagesController(ILanguageAppService languageAppService)
 {
     _languageAppService = languageAppService;
 }
コード例 #13
0
 public LanguageController(ILanguageAppService service)
 {
     _service = service;
 }
コード例 #14
0
 public LanguageViewModel(ILanguageAppService languageAppService, IRegionManager regionManager)
 {
     this.appService    = languageAppService;
     this.regionManager = regionManager;
 }
コード例 #15
0
 public LanguageController(IDistributedCache cache, ILanguageAppService languageAppService, IUrlHelper urlHelper)
 {
     _cache = cache;
     _languageAppService = languageAppService;
     _languageEnricher   = new LanguageEnricher(urlHelper);
 }
コード例 #16
0
 public LanguageAppService_Test()
 {
     _languageAppService = Resolve <ILanguageAppService>();
 }
コード例 #17
0
 public LanguageController(ILogger <LanguageController> logger, ILanguageAppService languageAppService)
 {
     _logger             = logger;
     _languageAppService = languageAppService;
 }
コード例 #18
0
 public LanguageTextDetailsViewModel(ILanguageAppService appService)
 {
     this.appService = appService;
 }
コード例 #19
0
 public LanguageDetailsViewModel(ILanguageAppService appService)
 {
     language        = new ApplicationLanguageEditDto();
     this.appService = appService;
 }
コード例 #20
0
 public LanguageController(ILanguageAppService service, IHostingEnvironment hostingEnvironment, IOptions <AppSettings> settings)
     : base(hostingEnvironment, settings)
 {
     _service = service;
 }