Bundle Class

Represents a list of file references to be bundled together as a single resource.

Inheritance Hierarchy

System.Object
  System.Web.Optimization.Bundle
    System.Web.Optimization.DynamicFolderBundle
    System.Web.Optimization.ScriptBundle
    System.Web.Optimization.StyleBundle

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

Syntax

'Declaration
Public Class Bundle
'Usage
Dim instance As Bundle
public class Bundle
public ref class Bundle
type Bundle =  class end
public class Bundle

The Bundle type exposes the following members.

Constructors

  Name Description
Protected method Bundle() Initializes a new instance of the Bundle class.
Public method Bundle(String) Initializes a new instance of the Bundle class.
Public method Bundle(String, String) Initializes a new instance of the Bundle class.
Public method Bundle(String, IBundleTransform[]) Initializes a new instance of the Bundle class.
Public method Bundle(String, String, IBundleTransform[]) Initializes a new instance of the Bundle class.

Top

Properties

  Name Description
Public property Builder Gets the object used to build the bundle content from the individual files included in the Bundle object.
Public property CdnFallbackExpression Gets the script expression rendered by the Scripts helper class to reference the local bundle file if the CDN is unavailable.
Public property CdnPath Gets or sets an alternate URL for the bundle when it is stored in a content delivery network.
Public property ConcatenationToken Gets the token inserted between bundled files to ensure that the final bundle content is valid.
Public property EnableFileExtensionReplacements Gets a value that specifies whether to use the FileExtensionReplacementList.
Public property Orderer Gets a value that determines the order of files in a bundle.
Public property Path Gets the virtual path used to reference the Bundle from within a view or Web page.
Public property Transforms Gets the transforms which process the contents of a bundle.

Top

Methods

  Name Description
Public method ApplyTransforms Applies the transforms to the bundle.
Public method CacheLookup Overrides this to implement own caching logic.
Public method EnumerateFiles Generates an enumeration of VirtualFile objects that represent the contents of the bundle.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GenerateBundleResponse Processes the bundle request to generate the response.
Public method GetCacheKey Gets the cache key for the specified bundle context.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method Include(String[]) Specifies a set of files to be included in the Bundle.
Public method Include(String, IItemTransform[]) Specifies a set of files to be included in the Bundle.
Public method IncludeDirectory(String, String) Includes all files in a directory that match a search pattern.
Public method IncludeDirectory(String, String, Boolean) Includes all files in a directory that match a search pattern.
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)
Public method UpdateCache Updates the cache with the specified bundle response.

Top

Remarks

A bundle is referenced statically via the Path property.

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