BundleCollection Class

Contains and manages the set of registered Bundle objects in an ASP.NET application.

Inheritance Hierarchy

System.Object
  System.Web.Optimization.BundleCollection

Namespace:  System.Web.Optimization
Assembly:  System.Web.Optimization (in System.Web.Optimization.dll)

Syntax

'Declaration
Public Class BundleCollection _
    Implements IEnumerable(Of Bundle), IEnumerable
'Usage
Dim instance As BundleCollection
public class BundleCollection : IEnumerable<Bundle>, 
    IEnumerable
public ref class BundleCollection : IEnumerable<Bundle^>, 
    IEnumerable
type BundleCollection =  
    class 
        interface IEnumerable<Bundle>
        interface IEnumerable 
    end
public class BundleCollection implements IEnumerable<Bundle>, IEnumerable

The BundleCollection type exposes the following members.

Constructors

  Name Description
Public method BundleCollection Initializes a new instance of the BundleCollection class.

Top

Properties

  Name Description
Public property Count Gets the count of registered bundles in the collection.
Public property DirectoryFilter Gets a list of file patterns which are ignored when including files using wildcards or substitution tokens.
Public property FileExtensionReplacementList Gets the file extension replacement list.
Public property FileSetOrderList Gets a list that specifies default file orderings to use for files in the registered bundles.
Public property IgnoreList Gets the list of files to ignore.
Public property UseCdn Gets or sets whether the collection will try to use CdnPath if specified.

Top

Methods

  Name Description
Public method Add Adds a bundle to the collection.
Public methodStatic member AddDefaultFileExtensionReplacements Adds the default file extension replacements for common conventions.
Public methodStatic member AddDefaultFileOrderings Adds default file order specifications to use with bundles in the collection.
Public methodStatic member AddDefaultIgnorePatterns Adds the default file ignore patterns.
Public method Clear Removes all bundles from the collection.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetBundleFor Returns a bundle in the collection using the specified virtual path.
Protected method GetEnumerator Returns the bundle enumerator.
Public method GetHashCode (Inherited from Object.)
Public method GetRegisteredBundles Returns the collection of all registered bundles.
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Remove Removes a bundle from the collection.
Public method ResetAll Clears the bundles and resets all the defaults.
Public method ResolveBundleUrl(String) Returns the bundle URL for the specified virtual path.
Public method ResolveBundleUrl(String, Boolean) Returns the bundle URL for the specified virtual path, including a content hash if requested.
Public method ToString (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable<Bundle>.GetEnumerator Returns an enumerator that can be used to iterate through the collection.
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Returns an enumerator that can be used to iterate through the collection.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.Optimization Namespace