public StaticContentServiceImpl(ILiquidThemeEngine liquidEngine,
                                        ILocalCacheManager cacheManager, Func <WorkContext> workContextFactory,
                                        Func <IStorefrontUrlBuilder> urlBuilderFactory, Func <string, ContentItem> contentItemFactory,
                                        IStaticContentBlobProvider contentBlobProvider)
        {
            _liquidEngine = liquidEngine;

            _cacheManager        = cacheManager;
            _workContextFactory  = workContextFactory;
            _urlBuilderFactory   = urlBuilderFactory;
            _contentItemFactory  = contentItemFactory;
            _contentBlobProvider = contentBlobProvider;

            //Observe content changes to invalidate cache if changes occur
            _contentBlobProvider.Changed += (sender, args) =>
            {
                _cacheManager.Clear();
            };
            _contentBlobProvider.Renamed += (sender, args) =>
            {
                _cacheManager.Clear();
            };

            _markdownPipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
        }
 public SitemapController(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder, ISitemapsModuleApiOperations siteMapApi,
                          ILiquidThemeEngine themeEngine)
     : base(workContextAccessor, urlBuilder)
 {
     _liquidThemeEngine = themeEngine;
     _siteMapApi        = siteMapApi;
 }
 public SitemapController(WorkContext context, IStorefrontUrlBuilder urlBuilder, ISitemapsModuleApiClient siteMapApiClient,
                          ILiquidThemeEngine themeEngine, GenerateSitemapJob sitemapJob)
     : base(context, urlBuilder)
 {
     _liquidThemeEngine = themeEngine;
     _siteMapApiClient  = siteMapApiClient;
     _sitemapJob        = sitemapJob;
 }
Пример #4
0
 public AssetController(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder, ILiquidThemeEngine themeEngine,
                        IContentBlobProvider staticContentBlobProvider, IHostingEnvironment hostingEnvironment)
     : base(workContextAccessor, urlBuilder)
 {
     _themeEngine         = themeEngine;
     _contentBlobProvider = staticContentBlobProvider;
     _hostingEnvironment  = hostingEnvironment;
 }
Пример #5
0
 public StaticContentServiceImpl(string baseLocalPath, Markdown markdownRender, ILiquidThemeEngine liquidEngine,
                                 ICacheManager <object> cacheManager, Func <WorkContext> workContextFactory,
                                 Func <IStorefrontUrlBuilder> urlBuilderFactory)
 {
     _baseLocalPath      = baseLocalPath;
     _markdownRender     = markdownRender;
     _liquidEngine       = liquidEngine;
     _fileSystemWatcher  = MonitorContentFileSystemChanges();
     _cacheManager       = cacheManager;
     _workContextFactory = workContextFactory;
     _urlBuilderFactory  = urlBuilderFactory;
 }
Пример #6
0
 public LiquidThemedView(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder, ILiquidThemeEngine themeEngine, string viewName, string path, bool isMainPage)
 {
     if (string.IsNullOrEmpty(viewName))
     {
         throw new ArgumentNullException(nameof(viewName));
     }
     _workContextAccessor = workContextAccessor;
     _urlBuilder          = urlBuilder;
     _liquidThemeEngine   = themeEngine ?? throw new ArgumentNullException(nameof(themeEngine));
     _viewName            = viewName;
     _isMainPage          = isMainPage;
     Path = path;
 }
        public StaticContentServiceImpl(Markdown markdownRender, ILiquidThemeEngine liquidEngine,
                                        ILocalCacheManager cacheManager, Func<WorkContext> workContextFactory,
                                        Func<IStorefrontUrlBuilder> urlBuilderFactory, Func<string, ContentItem> contentItemFactory,
                                        IContentBlobProvider contentBlobProvider)
        {
            _markdownRender = markdownRender;
            _liquidEngine = liquidEngine;
            
            _cacheManager = cacheManager;
            _workContextFactory = workContextFactory;
            _urlBuilderFactory = urlBuilderFactory;
            _contentItemFactory = contentItemFactory;
            _contentBlobProvider = contentBlobProvider;

            //Observe content changes to invalidate cache if changes occur
            _contentBlobProvider.Changed += (sender, args) =>
            {
                _cacheManager.Clear();
            };
            _contentBlobProvider.Renamed += (sender, args) =>
            {
                _cacheManager.Clear();
            };
        }
Пример #8
0
 public AssetController(ILiquidThemeEngine themeEngine)
 {
     _themeEngine = themeEngine;
 }
Пример #9
0
 public AssetController(WorkContext context, IStorefrontUrlBuilder urlBuilder, ILiquidThemeEngine themeEngine, IStaticContentBlobProvider staticContentBlobProvider)
     : base(context, urlBuilder)
 {
     _themeEngine = themeEngine;
     _staticContentBlobProvider = staticContentBlobProvider;
 }
Пример #10
0
 public AssetController(ILiquidThemeEngine themeEngine)
 {
     _themeEngine = themeEngine;
 }
Пример #11
0
 public DotLiquidThemedViewEngine(IWorkContextAccessor workContextAccessor, IStorefrontUrlBuilder urlBuilder, ILiquidThemeEngine themeEngine)
 {
     _themeEngine         = themeEngine;
     _workContextAccessor = workContextAccessor;
     _urlBuilder          = urlBuilder;
 }
 public NoLiquidThemeMiddleware(RequestDelegate next, IWorkContextAccessor workContextAccessor, ILiquidThemeEngine liquidThemeEngine)
 {
     _next = next;
     _workContextAccessor = workContextAccessor;
     _liquidThemeEngine   = liquidThemeEngine;
 }