Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FeedController" /> class.
 /// </summary>
 /// <param name="blogRepository">The blog repository.</param>
 /// <param name="projectRepository">Project repository</param>
 /// <param name="siteConfig">Site configuration</param>
 /// <param name="urlShortener">URL shortener</param>
 public FeedController(IBlogRepository blogRepository, IProjectRepository projectRepository, ISiteConfiguration siteConfig, IUrlShortener urlShortener)
 {
     _blogRepository = blogRepository;
     _projectRepository = projectRepository;
     _siteConfig = siteConfig;
     _urlShortener = urlShortener;
 }
Пример #2
0
 public UsersController(IUserServices userServices,
                        IAccountServices accountServices,
                        ICategoryServices categoryServices,
                        ITransactionServices transactionServices,
                        IBudgetServices budgetServices,
                        IHttpContextProvider context,
                        ISiteConfiguration config,
                        ICryptoProvider crypto,
                        IUrlHelper urlHelper,
                        IModelCache cache,
                        ICachingHelpers cachingHelpers,
                        ISessionServices sessionServices)
     : base(userServices,
                                                                 accountServices,
                                                                 categoryServices,
                                                                 transactionServices, 
                                                                 budgetServices,
                                                                 context,
                                                                 config,
                                                                 urlHelper,
                                                                 cache,
                                                                 cachingHelpers)
 {
     _crypto = crypto;
     _sessionServices = sessionServices;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlogController" /> class.
 /// </summary>
 /// <param name="blogRepository">The blog post repository.</param>
 /// <param name="commentRepository">The Disqus comment repository</param>
 /// <param name="urlShortener">The URL shortener</param>
 /// <param name="socialManager">The social network manager used to get sharing URLs</param>
 /// <param name="siteConfig">Site configuration</param>
 public BlogController(IBlogRepository blogRepository, IDisqusCommentRepository commentRepository, IUrlShortener urlShortener, ISocialManager socialManager, ISiteConfiguration siteConfig)
 {
     _blogRepository = blogRepository;
     _commentRepository = commentRepository;
     _urlShortener = urlShortener;
     _socialManager = socialManager;
     _siteConfig = siteConfig;
     _profiler = MiniProfiler.Current;
 }
        public ProductProvider(IProductRepository productRepository, ISiteConfiguration siteConfiguration)
        {
            _productRepository = productRepository;
            _siteConfiguration = siteConfiguration;

            NoProductsFoundByCategoryError = "No products were found for the selected category. Please make another selection.";
            InvalidOrMalformedCategoryError = "An invalid or malformed category was selected. Please make another selection.";
            DefaultProductCategory = 18;
        }
Пример #5
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));
 }
Пример #7
0
 public BaseController(IUserServices userServices,
                       IAccountServices accountServices,
                       ICategoryServices categoryServices,
                       ITransactionServices transactionServices,
                       IBudgetServices budgetServices,
                       IHttpContextProvider context,
                       ISiteConfiguration config,
                       IUrlHelper urlHelper,
                       IModelCache cache,
                       ICachingHelpers cachingHelpers)
 {
     _userServices = userServices;
     _accountServices = accountServices;
     _categoryServices = categoryServices;
     _transactionServices = transactionServices;
     _budgetServices = budgetServices;
     _context = context;
     _config = config;
     _url = urlHelper;
     _cache = cache;
     _cachingHelpers = cachingHelpers;
 }
        public ComposerCookieAccessor(HttpRequestBase httpRequest, HttpResponseBase httpResponse)
        {
            //Dependencies
            if (httpRequest == null)
            {
                throw new ArgumentNullException("httpRequest");
            }
            if (httpResponse == null)
            {
                throw new ArgumentNullException("httpResponse");
            }

            _httpRequest  = httpRequest;
            _httpResponse = 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
            };
        }
Пример #9
0
 public UserProvider(IUserRepository customerRepository, IPasswordManager passwordManager, ISiteConfiguration siteConfiguration)
 {
     _customerRepository = customerRepository;
     _passwordManager = passwordManager;
     _siteConfiguration = siteConfiguration;
 }
 public CountryCodeProvider(IWebsiteContext websiteContext, ISiteConfiguration siteConfiguration)
 {
     _lazyCountryCode  = new Lazy <string>(GetCountryCodeFromConfiguration, true);
     WebsiteContext    = websiteContext;
     SiteConfiguration = siteConfiguration;
 }
 public RedirectController(IRedirectProvider redirectProvider, ISiteConfiguration siteConfiguration)
 {
     _redirectProvider = redirectProvider;
     _siteConfiguration = siteConfiguration;
 }
Пример #12
0
 public BreadcrumbViewService(IPageService pageService, ISiteConfiguration siteConfiguration)
 {
     _pageService      = pageService ?? throw new ArgumentNullException(nameof(pageService));
     SiteConfiguration = siteConfiguration;
 }
Пример #13
0
 public C1ContentSitemapPageExcludeProvider(ISiteConfiguration siteConfiguration)
 {
     SiteConfiguration = siteConfiguration ?? throw new ArgumentNullException(nameof(siteConfiguration));
 }
Пример #14
0
 public DevelopmentEnvironment(IUserInformation userInformation,
                               ISiteConfiguration configuration)
 {
     _userInformation = userInformation;
     _configuration = configuration;
 }
 public AuthenticationController(IUserProvider userProvider, ISiteConfiguration siteConfiguration)
 {
     _userProvider = userProvider;
     _siteConfiguration = siteConfiguration;
 }
Пример #16
0
 public bool CanCalculate(ISiteConfiguration siteConfiguration)
 {
     return(siteConfiguration is MixedUseConfiguration);
 }
Пример #17
0
 public HomeController(ISiteConfiguration siteConfiguration)
 {
     _siteConfiguration = siteConfiguration;
 }
Пример #18
0
 public bool CanCalculate(ISiteConfiguration siteConfiguration)
 {
     return(siteConfiguration is ApartmentConfiguration);
 }
Пример #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DisqusComments" /> class.
 /// </summary>
 /// <param name="commentRepository">The comment database repository.</param>
 /// <param name="siteConfiguration">The site configuration.</param>
 public DisqusComments(IDisqusCommentRepository commentRepository, ISiteConfiguration siteConfiguration, HttpClient client)
 {
     _commentRepository = commentRepository;
     _siteConfiguration = siteConfiguration;
     _client            = client;
 }
 public WebsiteProductUrlProvider(IPageService pageService, ISiteConfiguration siteConfiguration)
 {
     PageService       = pageService;
     SiteConfiguration = siteConfiguration;
 }
 public ConventionBasedDamProvider(ISiteConfiguration siteConfiguration, IProductMediaSettingsRepository productMediaSettingsRepository)
 {
     CdnDamProviderSettings         = siteConfiguration.CdnDamProviderSettings;
     ProductMediaSettingsRepository = productMediaSettingsRepository;
 }
Пример #22
0
 public ScopeProvider(IWebsiteContext websiteContext, ISiteConfiguration siteConfiguration)
 {
     _lazyDefaultScope = new Lazy <string>(GetDefaultScopeFromConfiguration, true);
     WebsiteContext    = websiteContext;
     SiteConfiguration = siteConfiguration;
 }
Пример #23
0
 public ProductsController(IProductProvider productProvider, ISiteConfiguration siteConfiguration)
 {
     _productProvider   = productProvider;
     _siteConfiguration = siteConfiguration;
 }
Пример #24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MicroblogRepository" /> class.
 /// </summary>
 /// <param name="siteConfiguration">The site configuration.</param>
 public MicroblogRepository(ISiteConfiguration siteConfiguration)
 {
     _siteConfiguration = siteConfiguration;
 }
Пример #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DisqusComments" /> class.
 /// </summary>
 /// <param name="commentRepository">The comment database repository.</param>
 /// <param name="siteConfiguration">The site configuration.</param>
 public DisqusComments(IDisqusCommentRepository commentRepository, ISiteConfiguration siteConfiguration)
 {
     _commentRepository = commentRepository;
     _siteConfiguration = siteConfiguration;
 }
 public ProductRepository(ISiteConfiguration siteConfiguration)
 {
     _siteConfiguration = siteConfiguration;
 }
Пример #27
0
 public UserProvider(IUserRepository customerRepository, IPasswordManager passwordManager, ISiteConfiguration siteConfiguration)
 {
     _customerRepository = customerRepository;
     _passwordManager    = passwordManager;
     _siteConfiguration  = siteConfiguration;
 }
 public SitemapGenerator(IEnumerable <ISitemapProvider> providers, ISitemapIndexGenerator indexGenerator, ISitemapGeneratorConfig config, ISiteConfiguration siteConfiguration)
 {
     Providers         = providers ?? throw new ArgumentNullException(nameof(ISitemapProvider));
     IndexGenerator    = indexGenerator ?? throw new ArgumentNullException(nameof(ISitemapIndexGenerator));
     Config            = config ?? throw new ArgumentNullException(nameof(ISitemapGeneratorConfig));
     SiteConfiguration = siteConfiguration ?? throw new ArgumentNullException(nameof(siteConfiguration));
 }
Пример #29
0
 public bool CanCalculate(ISiteConfiguration siteConfiguration)
 {
     return(siteConfiguration is SubDivisionConfiguration);
 }
Пример #30
0
 protected BuildingSite(decimal width, decimal length, ISiteConfiguration siteConfiguration) : base(width, length)
 {
     _siteConfiguration = siteConfiguration;
 }
 public ProductsController(IProductProvider productProvider, ISiteConfiguration siteConfiguration)
 {
     _productProvider = productProvider;
     _siteConfiguration = siteConfiguration;
 }
Пример #32
0
 public bool CanCalculate(ISiteConfiguration siteConfiguration)
 {
     return(siteConfiguration is CommercialConfiguration);
 }
Пример #33
0
 public AuthenticationController(IUserProvider userProvider, ISiteConfiguration siteConfiguration)
 {
     _userProvider      = userProvider;
     _siteConfiguration = siteConfiguration;
 }
Пример #34
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;
        }
Пример #35
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FeedController" /> class.
 /// </summary>
 /// <param name="blogRepository">The blog repository.</param>
 /// <param name="projectRepository">Project repository</param>
 /// <param name="siteConfig">Site configuration</param>
 /// <param name="urlShortener">URL shortener</param>
 public FeedController(IBlogRepository blogRepository, IProjectRepository projectRepository, ISiteConfiguration siteConfig, IUrlShortener urlShortener)
 {
     _blogRepository    = blogRepository;
     _projectRepository = projectRepository;
     _siteConfig        = siteConfig;
     _urlShortener      = urlShortener;
 }
Пример #36
0
 public ProductUrlProvider(IPageService pageService, IWebsiteContext websiteContext, ISiteConfiguration siteConfiguration)
 {
     PageService       = pageService;    //TODO: ?? throw new ArgumentNullException(nameof(pageService));
     WebsiteContext    = websiteContext; //TODO: ?? throw new ArgumentNullException(nameof(websiteContext));
     SiteConfiguration = siteConfiguration;
 }
Пример #37
0
 public IUserPrincipal GetUserFromSelector(HttpRequestBase request, ISiteConfiguration siteConfiguration)
 {
     return siteConfiguration.SecureMode ? GetUserFromCookie(request) : GetUserFromQueryString(request);
 }
Пример #38
0
 public PageNotFoundUrlProvider(IPageService pageService, ISiteConfiguration siteConfiguration)
 {
     PageService       = pageService ?? throw new ArgumentNullException(nameof(pageService));
     SiteConfiguration = siteConfiguration;
 }
Пример #39
0
 public ImageViewService(IMediaService mediaService, IWebsiteContext websiteContext, ISiteConfiguration siteConfiguration)
 {
     MediaService      = mediaService ?? throw new ArgumentNullException(nameof(mediaService));
     WebsiteContext    = websiteContext;
     SiteConfiguration = siteConfiguration;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MicroblogRepository" /> class.
 /// </summary>
 /// <param name="siteConfiguration">The site configuration.</param>
 public MicroblogRepository(ISiteConfiguration siteConfiguration)
 {
     _siteConfiguration = siteConfiguration;
 }
Пример #41
0
 public OrderUrlProvider(IPageService pageService, IWebsiteContext wbsiteContext, ISiteConfiguration siteConfiguration)
 {
     PageService       = pageService ?? throw new ArgumentNullException(nameof(pageService));
     WebsiteContext    = wbsiteContext;
     SiteConfiguration = siteConfiguration;
 }
Пример #42
0
 public UserRepository(ISiteConfiguration siteConfiguration)
 {
     _siteConfiguration = siteConfiguration;
 }
Пример #43
0
 public Site(ISiteConfiguration config)
 {
     _config = config;
 }
Пример #44
0
 public RedirectProvider(ISiteConfiguration siteConfiguration)
 {
     _siteConfiguration = siteConfiguration;
 }
 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));
 }
Пример #46
0
        public OrderUrlProvider(IPageService pageService, IWebsiteContext wbsiteContext, ISiteConfiguration siteConfiguration)
        {
            if (pageService == null)
            {
                throw new ArgumentNullException("pageService");
            }

            PageService       = pageService;
            WebsiteContext    = wbsiteContext;
            SiteConfiguration = siteConfiguration;
        }
 public RedirectProvider(ISiteConfiguration siteConfiguration)
 {
     _siteConfiguration = siteConfiguration;
 }
Пример #48
0
 public IUserPrincipal GetUserFromSelector(HttpRequestBase request, ISiteConfiguration siteConfiguration)
 {
     return(siteConfiguration.SecureMode ? GetUserFromCookie(request) : GetUserFromQueryString(request));
 }