/// <summary>
        /// Executes the provided delegate that is used to register the stylesheet files fluently.
        /// </summary>
        /// <param name="configureAction">The configure action.</param>
        /// <returns></returns>
        public virtual StyleSheetRegistrarBuilder StyleSheets(Action <WebAssetCollectionBuilder> configureAction)
        {
            Guard.IsNotNull(configureAction, "configureAction");

            WebAssetCollectionBuilder builder = new WebAssetCollectionBuilder(WebAssetType.StyleSheet, styleSheetRegistrar.StyleSheets);

            configureAction(builder);

            return(this);
        }
Пример #2
0
        /// <summary>
        /// Executes the provided delegate that is used to register the script files fluently in different groups.
        /// </summary>
        /// <param name="configureAction">The configure action.</param>
        /// <returns></returns>
        public virtual ScriptRegistrarBuilder Scripts(Action <WebAssetCollectionBuilder> configureAction)
        {
            Guard.IsNotNull(configureAction, "configureAction");

            WebAssetCollectionBuilder builder = new WebAssetCollectionBuilder(WebAssetType.JavaScript, scriptRegistrar.Scripts);

            configureAction(builder);

            return(this);
        }
 public WebAssetCollectionBuilderTests()
 {
     _collection = new WebAssetCollection(WebAssetDefaultSettings.ScriptFilesPath);
     _builder = new WebAssetCollectionBuilder(WebAssetType.JavaScript, _collection);
 }