示例#1
0
        public static IBundleConfigurationBuilder SetupJavaScript(this IBundleConfigurationBuilder bundleConfigurationBuilder, JavaScriptSettings javaScriptSettings)
        {
            if (bundleConfigurationBuilder == null)
            {
                throw new ArgumentNullException(nameof(bundleConfigurationBuilder));
            }
            if (javaScriptSettings == null)
            {
                throw new ArgumentNullException(nameof(javaScriptSettings));
            }

            bundleConfigurationBuilder.Set(Minify, javaScriptSettings.Minify);
            return(bundleConfigurationBuilder);
        }
示例#2
0
        public static IBundleConfigurationBuilder SetupCss(this IBundleConfigurationBuilder bundleConfigurationBuilder, CssSettings cssSettings)
        {
            if (bundleConfigurationBuilder == null)
            {
                throw new ArgumentNullException(nameof(bundleConfigurationBuilder));
            }
            if (cssSettings == null)
            {
                throw new ArgumentNullException(nameof(cssSettings));
            }

            bundleConfigurationBuilder.Set(Minify, cssSettings.Minify);
            return(bundleConfigurationBuilder);
        }
示例#3
0
        public static IBundleConfigurationBuilder SetupLess(this IBundleConfigurationBuilder bundleConfigurationBuilder, LessSettings settings)
        {
            if (bundleConfigurationBuilder == null)
            {
                throw new ArgumentNullException(nameof(bundleConfigurationBuilder));
            }
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            bundleConfigurationBuilder.Set(Compress, settings.Compress);
            bundleConfigurationBuilder.Set(Debug, settings.Debug);

            return(bundleConfigurationBuilder);
        }
示例#4
0
        public static IBundleConfigurationBuilder SetupCaching(this IBundleConfigurationBuilder bundleConfigurationBuilder, CachingSettings settings)
        {
            if (bundleConfigurationBuilder == null)
            {
                throw new ArgumentNullException(nameof(bundleConfigurationBuilder));
            }
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            bundleConfigurationBuilder.Set(Enabled, settings.Enabled);
            bundleConfigurationBuilder.Set(UseEtag, settings.UseEtag);
            bundleConfigurationBuilder.Set(Duration, settings.Duration);

            return(bundleConfigurationBuilder);
        }
示例#5
0
        public static IBundleConfigurationBuilder SetupBundling(this IBundleConfigurationBuilder bundleConfigurationBuilder, BundlingSettings settings)
        {
            if (bundleConfigurationBuilder == null)
            {
                throw new ArgumentNullException(nameof(bundleConfigurationBuilder));
            }
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            bundleConfigurationBuilder.Set(CombineResponse, settings.CombineResponse);
            bundleConfigurationBuilder.Set(FallbackOnError, settings.FallbackOnError);
            bundleConfigurationBuilder.Set(AutoRefresh, settings.AutoRefresh);
            bundleConfigurationBuilder.Set(IncludeContentHash, settings.IncludeContentHash);

            return(bundleConfigurationBuilder);
        }
示例#6
0
 public static IBundleConfigurationBuilder SetupCompression(this IBundleConfigurationBuilder bundleConfigurationBuilder, CompressSettings settings)
 {
     bundleConfigurationBuilder.Set(CompressionAlgorithm, settings.CompressionAlgorithm);
     bundleConfigurationBuilder.Set(CompressionLevel, settings.CompressionLevel);
     return(bundleConfigurationBuilder);
 }