コード例 #1
0
        public DeliverySettingsController(

            ISiteService siteService,
            IOrchardServices orchardServices,
            IDeliverySettingsService deliverySettingService,
            IRepository<DeliverySettingRecord> deliverySettingsRepository,
            IRepository<CountryRecord> countryRepository,
            IShapeFactory shapeFactory,
            IWorkContextAccessor workContextAccessor)
        {
            _siteService = siteService;
            _orchardServices = orchardServices;
            _deliverySettingService = deliverySettingService;
            _deliverySettingsRepository = deliverySettingsRepository;
            _countryRepository = countryRepository;
            Shape = shapeFactory;
            _workContextAccessor = workContextAccessor;
            var culture = _workContextAccessor.GetContext().CurrentCulture.Trim();
            cultureUsed = culture == "en-SG" ? "en-SG" : (culture == "id-ID" ? "id-ID" : "en-MY");

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
コード例 #2
0
        public DeliverySettingsController(

            ISiteService siteService,
            IOrchardServices orchardServices,
            IDeliverySettingsService deliverySettingService,
            IRepository <DeliverySettingRecord> deliverySettingsRepository,
            IRepository <CountryRecord> countryRepository,
            IShapeFactory shapeFactory,
            IWorkContextAccessor workContextAccessor)
        {
            _siteService                = siteService;
            _orchardServices            = orchardServices;
            _deliverySettingService     = deliverySettingService;
            _deliverySettingsRepository = deliverySettingsRepository;
            _countryRepository          = countryRepository;
            Shape = shapeFactory;
            _workContextAccessor = workContextAccessor;
            var culture = _workContextAccessor.GetContext().CurrentCulture.Trim();

            cultureUsed = culture == "en-SG" ? "en-SG" : (culture == "id-ID" ? "id-ID" : "en-MY");

            T      = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }