public BaseSearchCriteriaProvider(IWebsiteContext websiteContext, IInventoryLocationProvider inventoryLocationProvider, IComposerContext composerContext, IFulfillmentContext fulfillmentContext)
 {
     WebsiteContext            = websiteContext ?? throw new ArgumentNullException(nameof(websiteContext));;
     InventoryLocationProvider = inventoryLocationProvider ?? throw new ArgumentNullException(nameof(inventoryLocationProvider));
     ComposerContext           = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
     FulfillmentContext        = fulfillmentContext ?? throw new ArgumentNullException(nameof(fulfillmentContext));
 }
 public PageCollectionService(IPageCollectionRepository repositiry, IPageRepository pageRepositiry, IPageMetadataManager pageMetadataManager, IWebsiteContext websiteContext)
 {
     this.repositiry          = repositiry ?? throw new ArgumentNullException(nameof(repositiry));
     this.pageRepositiry      = pageRepositiry ?? throw new ArgumentNullException(nameof(pageRepositiry));
     this.pageMetadataManager = pageMetadataManager ?? throw new ArgumentNullException(nameof(pageMetadataManager));
     this.websiteContext      = websiteContext ?? throw new ArgumentNullException(nameof(websiteContext));
 }
Ejemplo n.º 3
0
 public StoreUrlProvider(ILocalizationProvider localizationProvider, IPageService pageService, IWebsiteContext wbsiteContext, ISiteConfiguration siteConfiguration)
 {
     LocalizationProvider = localizationProvider ?? throw new ArgumentNullException(nameof(localizationProvider));
     PageService          = pageService ?? throw new ArgumentNullException(nameof(pageService));
     WebsiteContext       = wbsiteContext;
     SiteConfiguration    = siteConfiguration;
 }
Ejemplo n.º 4
0
        public ComposerCookieAccessor(HttpRequestBase httpRequest, HttpResponseBase httpResponse)
        {
            _httpRequest  = httpRequest ?? throw new ArgumentNullException(nameof(httpRequest));
            _httpResponse = httpResponse ?? throw new ArgumentNullException(nameof(httpResponse));

            _websiteContext =
                (IWebsiteContext)AutofacDependencyResolver.Current.GetService(typeof(IWebsiteContext));
            _siteConfiguration =
                (ISiteConfiguration)AutofacDependencyResolver.Current.GetService(typeof(ISiteConfiguration));

            _cookieName       = _siteConfiguration.CookieAccesserSettings.Name + "_" + _websiteContext.WebsiteId;
            _requireSsl       = _siteConfiguration.CookieAccesserSettings.RequireSsl;
            _timeoutInMinutes = _siteConfiguration.CookieAccesserSettings.TimeoutInMinutes;
            _cookieDomain     = _siteConfiguration.CookieAccesserSettings.Domain;

            _jsonSettings = new JsonSerializerSettings
            {
                //Omit null so we don't pollute the cookie
                NullValueHandling     = NullValueHandling.Ignore,
                MissingMemberHandling = MissingMemberHandling.Ignore,

                //Encode date for webfarms
                DateFormatHandling   = DateFormatHandling.IsoDateFormat,
                DateTimeZoneHandling = DateTimeZoneHandling.Utc,

                //Allows for internal constructor
                ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor
            };
        }
 public CheckoutController(
     IPageService pageService,
     IComposerContext composerContext,
     ICheckoutBreadcrumbViewService confirmationBreadcrumbViewService,
     IBreadcrumbViewService breadcrumbViewService,
     ILanguageSwitchService languageSwitchService,
     ICartUrlProvider urlProvider,
     ICheckoutNavigationViewService checkoutNavigationViewService,
     IPaymentViewService paymentViewService,
     IMyAccountUrlProvider myAccountUrlProvider,
     ICartService cartService,
     IWebsiteContext websiteContext) :
     base(pageService,
          composerContext,
          confirmationBreadcrumbViewService,
          breadcrumbViewService,
          languageSwitchService,
          urlProvider,
          checkoutNavigationViewService,
          paymentViewService,
          myAccountUrlProvider,
          cartService,
          websiteContext)
 {
 }
Ejemplo n.º 6
0
 public GoogleSettings(IWebsiteContext websiteContext)
 {
     WebsiteContext = websiteContext;
     using (var con = new DataConnection())
     {
         GoogleSettingsMeta = con.Get <DataTypes.GoogleSettings>().FirstOrDefault(g => g.PageId == WebsiteContext.WebsiteId);
     }
 }
Ejemplo n.º 7
0
 public AccountRepository(IWebsiteContext context, IDbSetFactory dbSetFactory)
     : base(dbSetFactory)
 {
     if (context is WebsiteContext)
     {
         this.UserManager = new UserManager <Account>(new UserStore <Account>((WebsiteContext)context));
     }
 }
Ejemplo n.º 8
0
 public CartUrlProvider(IPageService pageService,
                        ICacheProvider cacheProvider,
                        IWebsiteContext websiteContext,
                        ISiteConfiguration siteConfiguration)
 {
     PageService       = pageService ?? throw new ArgumentNullException(nameof(pageService));
     CacheProvider     = cacheProvider ?? throw new ArgumentNullException(nameof(cacheProvider));
     WebsiteContext    = websiteContext ?? throw new ArgumentNullException(nameof(websiteContext));
     SiteConfiguration = siteConfiguration ?? throw new ArgumentNullException(nameof(siteConfiguration));
 }
Ejemplo n.º 9
0
 public WishListController(IComposerContext composerContext,
                           ICustomerViewService customerViewService,
                           IBreadcrumbViewService breadcrumbViewService,
                           ILocalizationProvider localizationProvider,
                           IWishListUrlProvider wishListUrlProvider,
                           IWishListViewService wishListViewService,
                           IWebsiteContext websiteContext) :
     base(composerContext, customerViewService, breadcrumbViewService, localizationProvider, wishListUrlProvider, wishListViewService, websiteContext)
 {
 }
Ejemplo n.º 10
0
        public OrderUrlProvider(IPageService pageService, IWebsiteContext wbsiteContext, ISiteConfiguration siteConfiguration)
        {
            if (pageService == null)
            {
                throw new ArgumentNullException("pageService");
            }

            PageService       = pageService;
            WebsiteContext    = wbsiteContext;
            SiteConfiguration = siteConfiguration;
        }
Ejemplo n.º 11
0
        public ImageViewService(IMediaService mediaService, IWebsiteContext websiteContext, ISiteConfiguration siteConfiguration)
        {
            if (mediaService == null)
            {
                throw new ArgumentNullException("mediaService");
            }

            MediaService      = mediaService;
            WebsiteContext    = websiteContext;
            SiteConfiguration = siteConfiguration;
        }
Ejemplo n.º 12
0
 public ConfigurationInventoryLocationProvider(
     IFulfillmentLocationsRepository fulfillmentLocationsRepository,
     IInventoryRepository inventoryRepository,
     IWebsiteContext websiteContext,
     ISiteConfiguration siteConfiguration)
 {
     FulfillmentLocationsRepository = fulfillmentLocationsRepository ?? throw new ArgumentNullException(nameof(fulfillmentLocationsRepository));
     InventoryRepository            = inventoryRepository ?? throw new ArgumentNullException(nameof(inventoryRepository));
     WebsiteContext    = websiteContext ?? throw new ArgumentNullException(nameof(websiteContext));
     SiteConfiguration = siteConfiguration;
 }
Ejemplo n.º 13
0
 public ContentSearchViewService(
     IMediaService mediaService,
     IWebsiteContext websiteContext,
     IPageService pageService,
     ISiteConfiguration siteConfiguration)
 {
     MediaService      = mediaService ?? throw new ArgumentNullException(nameof(mediaService));
     WebsiteContext    = websiteContext ?? throw new ArgumentNullException(nameof(websiteContext));
     PageService       = pageService ?? throw new ArgumentNullException(nameof(pageService));
     SiteConfiguration = siteConfiguration ?? throw new ArgumentNullException(nameof(siteConfiguration));
 }
Ejemplo n.º 14
0
 public CheckoutController(
     IPageService pageService,
     IComposerContext composerContext,
     ICartUrlProvider urlProvider,
     IMyAccountUrlProvider myAccountUrlProvider,
     ICartService cartService,
     IWebsiteContext websiteContext) :
     base(pageService,
          composerContext,
          urlProvider,
          myAccountUrlProvider,
          cartService,
          websiteContext)
 {
 }
        public MembershipController(
            IMyAccountUrlProvider myAccountUrlProvider,
            IMembershipViewService membershipViewService,
            IComposerContext composerContext,
            ISiteConfiguration siteConfiguration,
            IWebsiteContext websiteContext)
        {
            MyAccountUrlProvider  = myAccountUrlProvider ?? throw new ArgumentNullException(nameof(myAccountUrlProvider));
            MembershipViewService = membershipViewService ?? throw new ArgumentNullException(nameof(membershipViewService));
            ComposerContext       = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
            SiteConfiguration     = siteConfiguration ?? throw new ArgumentNullException(nameof(siteConfiguration));;
            WebsiteContext        = websiteContext ?? throw new ArgumentNullException(nameof(websiteContext));

            FormsAuthentication = new StaticFormsAuthenticationProxy();
        }
        public TestInventoryLocationProvider(
            IFulfillmentLocationsRepository fulfillmentLocationsRepository,
            IInventoryRepository inventoryRepository,
            ICookieAccessor <TestCookieDto> testCookieAccessor,
            IWebsiteContext websiteContext,
            ISiteConfiguration siteConfiguration)

            : base(
                fulfillmentLocationsRepository,
                inventoryRepository,
                websiteContext,
                siteConfiguration)
        {
            _testCookieAccessor = testCookieAccessor;
        }
        public ComposerContext(
            ICookieAccessor <ComposerCookieDto> cookieAccessor,
            IScopeProvider scopeProvider,
            HttpContextBase httpContextBase,
            ICountryCodeProvider countryCodeProvider,
            IWebsiteContext websiteContext)
        {
            CookieAccessor      = cookieAccessor ?? throw new ArgumentNullException(nameof(cookieAccessor));
            ScopeProvider       = scopeProvider ?? throw new ArgumentNullException(nameof(scopeProvider));
            HttpContextBase     = httpContextBase ?? throw new ArgumentNullException(nameof(httpContextBase));
            CountryCodeProvider = countryCodeProvider ?? throw new ArgumentNullException(nameof(countryCodeProvider));
            WebsiteContext      = websiteContext ?? throw new ArgumentNullException(nameof(websiteContext));
            EncryptionUtility   = new EncryptionUtility();

            SetAuthenticated();
        }
Ejemplo n.º 18
0
 protected CheckoutBaseController(
     IPageService pageService,
     IComposerContext composerContext,
     ICartUrlProvider urlProvider,
     IMyAccountUrlProvider myAccountUrlProvider,
     ICartService cartService,
     IWebsiteContext websiteContext
     )
 {
     PageService          = pageService ?? throw new ArgumentNullException(nameof(pageService));
     ComposerContext      = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
     UrlProvider          = urlProvider ?? throw new ArgumentNullException(nameof(urlProvider));
     MyAccountUrlProvider = myAccountUrlProvider ?? throw new ArgumentNullException(nameof(myAccountUrlProvider));
     WebsiteContext       = websiteContext;
     CartService          = cartService ?? throw new ArgumentNullException(nameof(cartService));
 }
Ejemplo n.º 19
0
        public StoreUrlProvider(ILocalizationProvider localizationProvider, IPageService pageService, IWebsiteContext wbsiteContext, ISiteConfiguration siteConfiguration)
        {
            if (localizationProvider == null)
            {
                throw new ArgumentNullException("localizationProvider");
            }
            if (pageService == null)
            {
                throw new ArgumentNullException("pageService");
            }

            LocalizationProvider = localizationProvider;
            PageService          = pageService;
            WebsiteContext       = wbsiteContext;
            SiteConfiguration    = siteConfiguration;
        }
Ejemplo n.º 20
0
 protected WishListBaseController(
     IComposerContext composerContext,
     ICustomerViewService customerViewService,
     IBreadcrumbViewService breadcrumbViewService,
     ILocalizationProvider localizationProvider,
     IWishListUrlProvider wishListUrlProvider,
     IWishListViewService wishListViewService,
     IWebsiteContext websiteContext
     )
 {
     ComposerContext       = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
     CustomerViewService   = customerViewService ?? throw new ArgumentNullException(nameof(customerViewService));
     BreadcrumbViewService = breadcrumbViewService ?? throw new ArgumentNullException(nameof(breadcrumbViewService));
     LocalizationProvider  = localizationProvider ?? throw new ArgumentNullException(nameof(localizationProvider));
     WishListUrlProvider   = wishListUrlProvider ?? throw new ArgumentNullException(nameof(wishListUrlProvider));
     WishLisViewService    = wishListViewService ?? throw new ArgumentNullException(nameof(wishListViewService));
 }
Ejemplo n.º 21
0
        public CartUrlProvider(IPageService pageService,
                               ICacheProvider cacheProvider,
                               IWebsiteContext websiteContext,
                               ISiteConfiguration siteConfiguration)
        {
            if (pageService == null)
            {
                throw new ArgumentNullException("pageService");
            }
            if (cacheProvider == null)
            {
                throw new ArgumentNullException("cacheProvider");
            }

            PageService       = pageService;
            CacheProvider     = cacheProvider;
            WebsiteContext    = websiteContext;
            SiteConfiguration = siteConfiguration;
        }
 public MyAccountViewService(
     IComposerContext composerContext,
     IMyAccountUrlProvider myAccountUrlProvider,
     IOrderUrlProvider orderUrlProvider,
     IWishListUrlProvider wishListUrlProvider,
     IRecurringScheduleUrlProvider recurringScheduleUrlProvider,
     IPageService pageService,
     IWebsiteContext websiteContext,
     IRecurringOrdersSettings recurringOrdersSettings,
     ISiteConfiguration siteConfiguration)
 {
     ComposerContext              = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
     MyAccountUrlProvider         = myAccountUrlProvider ?? throw new ArgumentNullException(nameof(myAccountUrlProvider));
     OrderUrlProvider             = orderUrlProvider ?? throw new ArgumentNullException(nameof(orderUrlProvider));
     WishListUrlProvider          = wishListUrlProvider ?? throw new ArgumentNullException(nameof(wishListUrlProvider));
     PageService                  = pageService ?? throw new ArgumentNullException(nameof(pageService));
     RecurringScheduleUrlProvider = recurringScheduleUrlProvider ?? throw new ArgumentNullException(nameof(recurringScheduleUrlProvider));
     WebsiteContext               = websiteContext ?? throw new ArgumentNullException(nameof(websiteContext));
     RecurringOrdersSettings      = recurringOrdersSettings ?? throw new ArgumentNullException(nameof(recurringOrdersSettings));
     SiteConfiguration            = siteConfiguration ?? throw new ArgumentNullException(nameof(siteConfiguration));
 }
Ejemplo n.º 23
0
        public PageService(
            IPageRepository pageRepositiry,
            IPageCollectionRepository pageCollectionRepositiry,
            IPageMetadataManager pageMetadataManager,
            IWebsiteContext websiteContext,
            Url.IPageUrlHelper pageUrlHelper,
            Views.IViewLocator viewLocator,
            IOptions <PagesOptions> options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            this.pageRepositiry           = pageRepositiry ?? throw new ArgumentNullException(nameof(pageRepositiry));
            this.pageCollectionRepositiry = pageCollectionRepositiry ?? throw new ArgumentNullException(nameof(pageCollectionRepositiry));
            this.pageMetadataManager      = pageMetadataManager ?? throw new ArgumentNullException(nameof(pageMetadataManager));
            this.websiteContext           = websiteContext ?? throw new ArgumentNullException(nameof(websiteContext));
            this.pageUrlHelper            = pageUrlHelper ?? throw new ArgumentNullException(nameof(pageUrlHelper));
            this.viewLocator = viewLocator ?? throw new ArgumentNullException(nameof(viewLocator));
            this.options     = options.Value;
        }
Ejemplo n.º 24
0
 protected CheckoutBaseController(
     IPageService pageService,
     IComposerContext composerContext,
     ICheckoutBreadcrumbViewService confirmationBreadcrumbViewService,
     IBreadcrumbViewService breadcrumbViewService,
     ILanguageSwitchService languageSwitchService,
     ICartUrlProvider urlProvider,
     IMyAccountUrlProvider myAccountUrlProvider,
     ICartService cartService,
     IWebsiteContext websiteContext
     )
 {
     PageService     = pageService ?? throw new ArgumentNullException(nameof(pageService));
     ComposerContext = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
     ConfirmationBreadcrumbViewService = confirmationBreadcrumbViewService ?? throw new ArgumentNullException(nameof(confirmationBreadcrumbViewService));
     BreadcrumbViewService             = breadcrumbViewService ?? throw new ArgumentNullException(nameof(breadcrumbViewService));
     LanguageSwitchService             = languageSwitchService ?? throw new ArgumentNullException(nameof(languageSwitchService));
     UrlProvider          = urlProvider ?? throw new ArgumentNullException(nameof(urlProvider));
     MyAccountUrlProvider = myAccountUrlProvider ?? throw new ArgumentNullException(nameof(myAccountUrlProvider));
     WebsiteContext       = websiteContext;
     CartService          = cartService ?? throw new ArgumentNullException(nameof(cartService));
 }
 public SearchUrlProvider(ISiteConfiguration siteConfiguration, IPageService pageService, IWebsiteContext websiteContext)
 {
     PageService       = pageService ?? throw new ArgumentNullException(nameof(pageService));
     WebsiteContext    = websiteContext ?? throw new ArgumentNullException(nameof(websiteContext));
     SiteConfiguration = siteConfiguration ?? throw new ArgumentNullException(nameof(siteConfiguration));
 }
Ejemplo n.º 26
0
 public AutocompleteProvider(IWebsiteContext websiteContext)
 {
     WebsiteContext = websiteContext;
 }
Ejemplo n.º 27
0
 public OrderUrlProvider(IPageService pageService, IWebsiteContext wbsiteContext, ISiteConfiguration siteConfiguration)
 {
     PageService       = pageService ?? throw new ArgumentNullException(nameof(pageService));
     WebsiteContext    = wbsiteContext;
     SiteConfiguration = siteConfiguration;
 }
Ejemplo n.º 28
0
 public ImageViewService(IMediaService mediaService, IWebsiteContext websiteContext, ISiteConfiguration siteConfiguration)
 {
     MediaService      = mediaService ?? throw new ArgumentNullException(nameof(mediaService));
     WebsiteContext    = websiteContext;
     SiteConfiguration = siteConfiguration;
 }
Ejemplo n.º 29
0
 public ScopeProvider(IWebsiteContext websiteContext, ISiteConfiguration siteConfiguration)
 {
     _lazyDefaultScope = new Lazy <string>(GetDefaultScopeFromConfiguration, true);
     WebsiteContext    = websiteContext;
     SiteConfiguration = siteConfiguration;
 }
 public UnitOfWork(IWebsiteContext context)
 {
     this.context = context;
 }
 public CategoryBrowsingUrlProvider(ICacheProvider cacheProvider, IPageService pageService, IWebsiteContext websiteContext)
 {
     CacheProvider  = cacheProvider ?? throw new ArgumentNullException(nameof(cacheProvider));
     PageService    = pageService ?? throw new ArgumentNullException(nameof(pageService));
     WebsiteContext = websiteContext ?? throw new ArgumentNullException(nameof(websiteContext));
 }