Design Pattern Framework 3.5
ViewStateProviderCollection Class
Patterns-In-Action! Application ► ViewState ► ViewStateProviderCollection
Represents a collection of viewstate providers.
Declaration Syntax
C# | Visual Basic |
public class ViewStateProviderCollection : ProviderCollection
Public Class ViewStateProviderCollection _ Inherits ProviderCollection
Members
All Members | Constructors | Methods | Properties | ||
|
|
|
Icon | Member | Description |
---|---|---|
ViewStateProviderCollection()()() |
Initializes a new instance of the ViewStateProviderCollection class
|
|
Add(ProviderBase) |
Adds a viewstate provider to a collection of providers.
(Overrides ProviderCollection.Add(ProviderBase).) |
|
Clear()()() |
Removes all items from the collection.
(Inherited from ProviderCollection.) |
|
CopyTo(array<ProviderBase>[]()[], Int32) |
Copies the contents of the collection to the given array starting at the specified index.
(Inherited from ProviderCollection.) |
|
Count |
Gets the number of providers in the collection.
(Inherited from ProviderCollection.) |
|
Equals(Object) | (Inherited from Object.) |
|
Finalize()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) |
|
GetEnumerator()()() |
Returns an object that implements the IEnumerator interface to iterate through the collection.
(Inherited from ProviderCollection.) |
|
GetHashCode()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) |
|
GetType()()() |
Gets the Type of the current instance.
(Inherited from Object.) |
|
IsSynchronized |
Gets a value indicating whether access to the collection is synchronized (thread safe).
(Inherited from ProviderCollection.) |
|
Item[([(String])]) |
Gets a viewState provider from a list given its name.
|
|
MemberwiseClone()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) |
|
Remove(String) |
Removes a provider from the collection.
(Inherited from ProviderCollection.) |
|
SetReadOnly()()() |
Sets the collection to be read-only.
(Inherited from ProviderCollection.) |
|
SyncRoot |
Gets the current object.
(Inherited from ProviderCollection.) |
|
ToString()()() | (Inherited from Object.) |
Remarks
Design Pattern: Microsoft's Provider Design Pattern. This patterns is
really is a blending of 3 GoF Design Patterns: Strategy, Factory, Singleton.
Strategy Pattern because the client has the option which viewstate provider Strategy to choose.
Singleton Pattern because GlobalViewStateSingleton is a Singleton that holds a list of all available viewstate providers.
Factory Pattern because viewstate providers are manufactured by a Factory class according to settings in a configuration file (web config).
Inheritance Hierarchy
Object | ||
ProviderCollection | ||
ViewStateProviderCollection |