コード例 #1
0
        public static BundleConfiguration AddBaseBundles(this BundleConfiguration bundleConfiguration, params string[] bundleNames)
        {
            Check.NotNull(bundleNames, nameof(bundleNames));

            bundleConfiguration.BaseBundles.AddRange(bundleNames);

            return(bundleConfiguration);
        }
コード例 #2
0
        public static BundleConfiguration AddContributors(this BundleConfiguration bundleConfiguration, params Type[] contributorTypes)
        {
            Check.NotNull(contributorTypes, nameof(contributorTypes));

            foreach (var contributorType in contributorTypes)
            {
                bundleConfiguration.Contributors.Add(contributorType);
            }

            return(bundleConfiguration);
        }
コード例 #3
0
        private BundleConfiguration CreateBundle(string bundleName, Action <BundleConfiguration> configureAction)
        {
            var bundle = new BundleConfiguration(bundleName);

            configureAction?.Invoke(bundle);

            if (_lazyBundleConfigurationActions.TryGetValue(bundleName, out var configurationActions))
            {
                lock (configurationActions)
                {
                    configurationActions.ForEach(c => c.Invoke(bundle));
                }
            }

            return(bundle);
        }
コード例 #4
0
 public static BundleConfiguration AddFiles(this BundleConfiguration bundleConfiguration, params string[] files)
 {
     bundleConfiguration.Contributors.AddFiles(files);
     return(bundleConfiguration);
 }