Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / OutputCacheProfileCollection.cs / 1305376 / 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))] 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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))] 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WinCategoryAttribute.cs
- GestureRecognitionResult.cs
- DataAdapter.cs
- LineVisual.cs
- SizeAnimationUsingKeyFrames.cs
- ToolboxComponentsCreatingEventArgs.cs
- ClassicBorderDecorator.cs
- EventSourceCreationData.cs
- Setter.cs
- Span.cs
- IISUnsafeMethods.cs
- ResourceIDHelper.cs
- Confirm.cs
- XamlReader.cs
- EntityDataSourceStatementEditorForm.cs
- DbDataReader.cs
- HttpProtocolImporter.cs
- FigureHelper.cs
- InputScopeNameConverter.cs
- ResourceExpressionBuilder.cs
- QilLiteral.cs
- ConditionCollection.cs
- ValidatedControlConverter.cs
- DiscoveryVersionConverter.cs
- TableRow.cs
- ExtendedProtectionPolicyElement.cs
- StateRuntime.cs
- BitmapPalette.cs
- OleDbConnectionInternal.cs
- DependencyObjectProvider.cs
- _SafeNetHandles.cs
- DataGridViewTopLeftHeaderCell.cs
- HtmlUtf8RawTextWriter.cs
- SQLInt16Storage.cs
- ArrayHelper.cs
- ChannelBinding.cs
- WeakReferenceEnumerator.cs
- SecurityManager.cs
- ParentQuery.cs
- PropertyInformationCollection.cs
- WindowsToolbar.cs
- DataBindingHandlerAttribute.cs
- BitmapMetadataBlob.cs
- RequestBringIntoViewEventArgs.cs
- sitestring.cs
- SwitchLevelAttribute.cs
- MarkupObject.cs
- DefaultPropertyAttribute.cs
- PropertyInfoSet.cs
- SharedDp.cs
- DocumentPaginator.cs
- TagMapInfo.cs
- GAC.cs
- odbcmetadatacollectionnames.cs
- GenericsInstances.cs
- ListContractAdapter.cs
- ConfigurationLockCollection.cs
- ExecutorLocksHeldException.cs
- InteropAutomationProvider.cs
- Transform3DGroup.cs
- DoubleStorage.cs
- NamedObjectList.cs
- Command.cs
- DynamicResourceExtensionConverter.cs
- AppDomainAttributes.cs
- QueryValue.cs
- Freezable.cs
- DataGridViewRowPrePaintEventArgs.cs
- CompilerParameters.cs
- XmlSchemaSimpleContentRestriction.cs
- UnsafeNativeMethodsTablet.cs
- StylusPointPropertyUnit.cs
- RuleRefElement.cs
- AttributeCollection.cs
- BinaryUtilClasses.cs
- ParserStreamGeometryContext.cs
- HtmlHead.cs
- QueryableDataSource.cs
- ExpressionPrinter.cs
- IdentityManager.cs
- CodeLabeledStatement.cs
- CalendarDesigner.cs
- storepermission.cs
- NeutralResourcesLanguageAttribute.cs
- MediaSystem.cs
- RawStylusActions.cs
- PrivilegeNotHeldException.cs
- ServiceModelEnumValidator.cs
- TextContainerChangedEventArgs.cs
- TreeView.cs
- _NativeSSPI.cs
- ReferentialConstraintRoleElement.cs
- ConnectionManager.cs
- PageOutputQuality.cs
- ASCIIEncoding.cs
- VisualCollection.cs
- Error.cs
- IfAction.cs
- GridViewRowCollection.cs
- TabItemWrapperAutomationPeer.cs