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
- EmbeddedObject.cs
- ConfigsHelper.cs
- SchemaElementDecl.cs
- XmlAttributeCollection.cs
- CTreeGenerator.cs
- ClientBuildManager.cs
- Win32Native.cs
- XPathNavigator.cs
- SQLInt64.cs
- Track.cs
- _LocalDataStore.cs
- InvalidDataContractException.cs
- LogWriteRestartAreaAsyncResult.cs
- MinimizableAttributeTypeConverter.cs
- EditorPartCollection.cs
- CodeVariableDeclarationStatement.cs
- FontSizeConverter.cs
- RecipientIdentity.cs
- TypeForwardedToAttribute.cs
- CodeParameterDeclarationExpressionCollection.cs
- CompoundFileStorageReference.cs
- DynamicPropertyHolder.cs
- ExpandCollapsePattern.cs
- ContentType.cs
- PerformanceCountersElement.cs
- CacheSection.cs
- PrintPreviewControl.cs
- WebBrowserContainer.cs
- Misc.cs
- MarshalDirectiveException.cs
- BlurBitmapEffect.cs
- FontCacheUtil.cs
- HitTestParameters.cs
- CompilationUtil.cs
- AssemblyNameProxy.cs
- SafeCryptContextHandle.cs
- FigureParagraph.cs
- ApplicationHost.cs
- EventWaitHandle.cs
- _AcceptOverlappedAsyncResult.cs
- SafeNativeMethods.cs
- ConnectionPoolRegistry.cs
- EncodingDataItem.cs
- SystemBrushes.cs
- DataRowExtensions.cs
- HeaderPanel.cs
- TickBar.cs
- MsmqMessageProperty.cs
- ExecutionPropertyManager.cs
- InstanceHandleReference.cs
- Composition.cs
- AppDomainAttributes.cs
- APCustomTypeDescriptor.cs
- TableLayoutSettingsTypeConverter.cs
- RankException.cs
- CodeIdentifier.cs
- EntityModelBuildProvider.cs
- SiteOfOriginPart.cs
- SocketConnection.cs
- NetworkAddressChange.cs
- TabControl.cs
- DrawingVisual.cs
- GeometryGroup.cs
- FileSystemWatcher.cs
- ClientFormsAuthenticationCredentials.cs
- CommandBindingCollection.cs
- PostBackOptions.cs
- XmlDataCollection.cs
- InstallerTypeAttribute.cs
- CharAnimationUsingKeyFrames.cs
- Dump.cs
- KnownTypes.cs
- NTAccount.cs
- FixedFlowMap.cs
- ProcessStartInfo.cs
- HttpDictionary.cs
- Inline.cs
- LocationFactory.cs
- Int32Converter.cs
- EmulateRecognizeCompletedEventArgs.cs
- XmlWriterSettings.cs
- TdsParserSafeHandles.cs
- InheritanceContextHelper.cs
- PasswordRecovery.cs
- ServiceOperation.cs
- ModelVisual3D.cs
- TypeElement.cs
- FixedTextBuilder.cs
- RtfFormatStack.cs
- SqlConnectionPoolProviderInfo.cs
- SoapFormatExtensions.cs
- ScriptComponentDescriptor.cs
- DataGridViewIntLinkedList.cs
- DoWorkEventArgs.cs
- ProcessThreadCollection.cs
- BuildProvider.cs
- PixelFormats.cs
- SimpleLine.cs
- HttpWebRequest.cs
- CallTemplateAction.cs