OutputCacheProviderCollection::Add Method (ProviderBase^)

.NET Framework (current version)
 

Inserts a provider into the collection of output-cache providers.

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

public:
virtual void Add(
	ProviderBase^ provider
) override

Parameters

provider
Type: System.Configuration.Provider::ProviderBase^

An output cache provider.

Exception Condition
ArgumentNullException

provider is null.

ArgumentException

provider is not of type OutputCacheProvider.

The Add method adds only providers that are specified in the configuration for a Web site. Therefore, it does not add the ASP.NET default provider for the in-memory output cache.

This collection is read-only. It is populated one time based on the providers that are specified in configuration. After the collection is populated, you cannot modify the set of available providers.

.NET Framework
Available since 4.0
Return to top
Show: