Share via

System.Web.Optimization Namespace

The System.Web.Optimization namespace includes classes that support Content Delivery Networks (CDN) and the process of optimizing JavaScript and cascading style sheet (CSS) files in a website to reduce file size and improve page performance. The classes in this namespace enable developers to carry out bundling and minification tasks to optimize their JavaScript and CSS files.


  Class Description
Public class Bundle Represents a list of file references to be bundled together as a single resource.
Public class BundleCollection Contains and manages the set of registered Bundle objects in an ASP.NET application.
Public class BundleContext Encapsulates the info needed to process a bundle request
Public class BundleDefinition Represents a bundle definition as specified by the bundle manifest.
Public class BundleFile Represents a single file within a bundle.
Public class BundleFileSetOrdering Encapsulates a named set of files with relative orderings, for example jquery or modernizer.
Public class BundleManifest Represents the XML configuration to configure the Bundles bundle collection.
Public class BundleModule Represents a module that enables bundling to intercept requests to bundle URLs.
Public class BundleResolver Represents a class that determine if a script reference is a bundle, and what it contains to prevent duplicate script references.
Public class BundleResponse Encapsulates the response data that will be sent for a bundle request.
Public class BundleTable Static holder class for the default bundle collection.
Public class CssMinify Represents a IBundleTransform that does CSS minification.
Public class CssRewriteUrlTransform Rewrites urls to be absolute so assets will still be found after bundling.
Public class DefaultBundleBuilder Represents the default logic which combines files in the bundle.
Public class DefaultBundleOrderer Provides default IBundleOrderer implementation which orders files in a bundle using FileSetOrderList.
Public class DynamicFolderBundle Represents a Bundle object that ASP.NET creates from a folder that contains files of the same type.
Public class FileExtensionReplacementList Represents a set of file extensions that will be used to select different files based on the OptimizationMode.
Public class IgnoreList A list of filename patterns to be ignored and thereby excluded from bundles.
Public class JsMinify Represents a BundleTransform that does CSS Minification.
Public class OptimizationSettings Configuration settings used by the Optimizer class to generate bundle responses outside of ASP.NET applications.
Public class Optimizer Represents a standalone class for generating bundle responses outside of ASP.NET
Public class PreApplicationStartCode Hooks up the BundleModule
Public class ScriptBundle Represents a bundle that does Js Minification.
Public class Scripts Represents a type that allows queuing and rendering script elements.
Public class StyleBundle Represents a bundle that does CSS minification.
Public class Styles Represents a helper class for rendering link elements.


  Interface Description
Public interface IBundleBuilder Specifies the building of the bundle from the individual file contents.
Public interface IBundleOrderer Defines methods for ordering files within a Bundle.
Public interface IBundleResolver Represents an interface used to query the BundleCollection for metadata.
Public interface IBundleTransform Defines a method that transforms the files in a BundleResponse object.
Public interface IItemTransform Defines the method that transforms the item in a bundle response object.


  Enumeration Description
Public enumeration OptimizationMode OptimizationMode used by IgnoreList and FileExtensionReplacement.