Beispiel #1
0
 public BundleMiddleware(
     RequestDelegate next,
     IBundleCollection collection,
     IBundleCache bundleCache,
     IBundleBuilder bundleBuilder,
     IOptionsMonitor <BundlingOptions> optionsMonitor,
     IThemeRegistry themeRegistry,
     ILogger <BundleMiddleware> logger)
 {
     _next           = next;
     _collection     = collection;
     _bundleCache    = bundleCache;
     _bundleBuilder  = bundleBuilder;
     _optionsMonitor = optionsMonitor;
     _themeRegistry  = themeRegistry;
     _logger         = logger;
 }
        public PageAssetsBuilder(
            SeoSettings seoSettings,
            ThemeSettings themeSettings,
            HttpContextBase httpContext,
            IStoreContext storeContext,
            IBundleBuilder bundleBuilder)
        {
            _httpContext   = httpContext;
            _seoSettings   = seoSettings;
            _themeSettings = themeSettings;
            _bundleBuilder = bundleBuilder;

            var bodyHtmlId = storeContext.CurrentStore.HtmlBodyId;

            if (bodyHtmlId.HasValue())
            {
                BodyAttributes["id"] = bodyHtmlId;
            }
        }
 public PageAssetsBuilder(
     SeoSettings seoSettings,
     ThemeSettings themeSettings,
     HttpContextBase httpContext,
     IStoreContext storeContext,
     IBundleBuilder bundleBuilder)
 {
     this._httpContext          = httpContext; // codehint: sm-add
     this._seoSettings          = seoSettings;
     this._themeSettings        = themeSettings;
     this._titleParts           = new List <string>();
     this._metaDescriptionParts = new List <string>();
     this._metaKeywordParts     = new List <string>();
     this._scriptParts          = new Dictionary <ResourceLocation, List <WebAssetDescriptor> >();
     this._cssParts             = new Dictionary <ResourceLocation, List <WebAssetDescriptor> >();
     this._canonicalUrlParts    = new List <string>();
     this._bodyCssClasses       = new List <string>(); // codehint: sm-add (MC)
     this._storeContext         = storeContext;        // codehint: sm-add
     this._bundleBuilder        = bundleBuilder;
 }
Beispiel #4
0
 public PageAssetsBuilder(
     SeoSettings seoSettings,
     ThemeSettings themeSettings,
     HttpContextBase httpContext,
     ISiteContext storeContext,
     IBundleBuilder bundleBuilder)
 {
     this._httpContext          = httpContext;
     this._seoSettings          = seoSettings;
     this._themeSettings        = themeSettings;
     this._titleParts           = new List <string>();
     this._metaDescriptionParts = new List <string>();
     this._metaKeywordParts     = new List <string>();
     this._scriptParts          = new Dictionary <ResourceLocation, List <WebAssetDescriptor> >();
     this._cssParts             = new Dictionary <ResourceLocation, List <WebAssetDescriptor> >();
     this._canonicalUrlParts    = new List <string>();
     this._customHeadParts      = new List <string>();
     this._bodyCssClasses       = new List <string>();
     this._linkParts            = new List <RouteValueDictionary>();
     this._storeContext         = storeContext;
     this._bundleBuilder        = bundleBuilder;
 }
 static ImagePathBundleBuilder()
 {
     Instance = new DefaultBundleBuilder();
 }
 public SeajsEmbedBundle(string virtualPath, string areaName, string cdnPath)
     : base(virtualPath, cdnPath)
 {
     AreaName = areaName;
     _bulder = new EmbeddedBuilder();
 }
 public SeajsEmbedBundle(string virtualPath, string areaName, bool combine)
     : base(virtualPath, combine)
 {
     AreaName = areaName;
     _bulder = new EmbeddedBuilder();
 }
Beispiel #8
0
 public ThemeBundleResult(string themeVirtualPath, string[] themeFiles, IBundleBuilder themeBuilder)
 {
     _themeVirtualPath = themeVirtualPath;
     _themeFiles       = themeFiles;
     _themeBuilder     = themeBuilder;
 }
Beispiel #9
0
        public static void AddThemeBundle(this BundleCollection bundles, string themeVirtualPath, string[] themeFiles, IBundleBuilder themeBuilder)
        {
            var themeBundle = new CustomStyleBundle(themeVirtualPath).Include(themeFiles);

            themeBundle.Builder = themeBuilder;

            bundles.Add(themeBundle);
        }
 public BundleConfigurer UseBuilder(IBundleBuilder builder)
 {
     Bundle.Builder = builder;
     return(this);
 }
Beispiel #11
0
        public static Bundle BuildWith(this Bundle bundle, IBundleBuilder builder)
        {
            bundle.Builder = builder;

            return(bundle);
        }
Beispiel #12
0
 public SeajsEmbedBundle(string virtualPath, string areaName, string cdnPath)
     : base(virtualPath, cdnPath)
 {
     AreaName = areaName;
     _bulder  = new EmbeddedBuilder();
 }
Beispiel #13
0
 public SeajsEmbedBundle(string virtualPath, string areaName, bool combine)
     : base(virtualPath, combine)
 {
     AreaName = areaName;
     _bulder  = new EmbeddedBuilder();
 }