Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / OutputCacheProfileCollection.cs / 2 / OutputCacheProfileCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.Globalization; using System.IO; using System.Text; using System.Web.UI; using System.ComponentModel; using System.Web.Util; using System.Security.Permissions; [ConfigurationCollection(typeof(OutputCacheProfile))] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class OutputCacheProfileCollection : ConfigurationElementCollection { private static ConfigurationPropertyCollection _properties; static OutputCacheProfileCollection() { // Property initialization _properties = new ConfigurationPropertyCollection(); } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } public OutputCacheProfileCollection() : base(StringComparer.OrdinalIgnoreCase) { } // public properties public String[] AllKeys { get { return StringUtil.ObjectArrayToStringArray(BaseGetAllKeys()); } } public new OutputCacheProfile this[string name] { get { return (OutputCacheProfile)BaseGet(name); } // Having a setter here would be strange in that you could write // collection["Name1"] = new OutputCacheProfile("differentName"... // } public OutputCacheProfile this[int index] { get { return (OutputCacheProfile)BaseGet(index); } set { if (BaseGet(index) != null) BaseRemoveAt(index); BaseAdd(index, value); } } // Protected Overrides protected override ConfigurationElement CreateNewElement() { return new OutputCacheProfile(); } protected override Object GetElementKey(ConfigurationElement element) { return ((OutputCacheProfile)element).Name; } // public methods public void Add(OutputCacheProfile name) { BaseAdd(name); } public void Clear() { BaseClear(); } public OutputCacheProfile Get(int index) { return (OutputCacheProfile)BaseGet(index); } public OutputCacheProfile Get(string name) { return (OutputCacheProfile)BaseGet(name); } public String GetKey(int index) { return (String) BaseGetKey(index); } public void Remove(string name) { BaseRemove(name); } public void RemoveAt(int index) { BaseRemoveAt(index); } public void Set(OutputCacheProfile user) { BaseAdd(user, false); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Header.cs
- RadioButtonPopupAdapter.cs
- ComponentManagerBroker.cs
- MsmqInputChannelListener.cs
- BitmapVisualManager.cs
- EtwTrace.cs
- WindowsTokenRoleProvider.cs
- SignatureToken.cs
- LocalizationComments.cs
- XamlSerializer.cs
- TdsParserSafeHandles.cs
- ProcessModelSection.cs
- RequestQueryParser.cs
- DesignerCategoryAttribute.cs
- WmlSelectionListAdapter.cs
- IntranetCredentialPolicy.cs
- DeclarativeExpressionConditionDeclaration.cs
- InternalRelationshipCollection.cs
- ToolStripButton.cs
- DropShadowBitmapEffect.cs
- ImageClickEventArgs.cs
- InheritanceContextChangedEventManager.cs
- PassportPrincipal.cs
- IndexedEnumerable.cs
- FixedDocumentSequencePaginator.cs
- MSHTMLHost.cs
- Win32SafeHandles.cs
- ParameterBinding.cs
- VariableDesigner.xaml.cs
- TabRenderer.cs
- EDesignUtil.cs
- PathTooLongException.cs
- CompilerParameters.cs
- LinearKeyFrames.cs
- AlignmentYValidation.cs
- WindowsListViewItemCheckBox.cs
- PEFileEvidenceFactory.cs
- SchemaName.cs
- Profiler.cs
- SoapInteropTypes.cs
- TimeZone.cs
- BindingContext.cs
- BaseUriHelper.cs
- DynamicRenderer.cs
- DispatchOperationRuntime.cs
- EventSourceCreationData.cs
- _UriSyntax.cs
- FragmentNavigationEventArgs.cs
- XmlSchemaChoice.cs
- XmlDataImplementation.cs
- QueryableDataSourceView.cs
- ProfilePropertySettings.cs
- DefaultPropertyAttribute.cs
- EmptyCollection.cs
- PropertyFilterAttribute.cs
- Delay.cs
- FileStream.cs
- ProcessDesigner.cs
- Matrix.cs
- SimpleHandlerFactory.cs
- Pair.cs
- Formatter.cs
- FaultDescriptionCollection.cs
- DataGridRow.cs
- WmlFormAdapter.cs
- HwndStylusInputProvider.cs
- Debugger.cs
- BitmapCacheBrush.cs
- SafeFileMappingHandle.cs
- CharacterMetricsDictionary.cs
- RuleAction.cs
- ModuleConfigurationInfo.cs
- OleDbDataReader.cs
- BidPrivateBase.cs
- DropShadowBitmapEffect.cs
- AutomationIdentifier.cs
- ColorAnimationUsingKeyFrames.cs
- ZipIORawDataFileBlock.cs
- Profiler.cs
- AvTraceDetails.cs
- Attributes.cs
- Label.cs
- Baml2006ReaderFrame.cs
- XmlSchemaParticle.cs
- OdbcFactory.cs
- TrackBar.cs
- DefaultTextStoreTextComposition.cs
- CharConverter.cs
- METAHEADER.cs
- TypeHelpers.cs
- Content.cs
- SessionStateContainer.cs
- URL.cs
- RpcResponse.cs
- XPathNodeList.cs
- PolicyValidationException.cs
- SafeEventLogWriteHandle.cs
- StylusButtonEventArgs.cs
- columnmapfactory.cs
- PeerContact.cs