Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / HttpModuleActionCollection.cs / 1305376 / HttpModuleActionCollection.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.IO; using System.Text; using System.Web.Configuration; using System.Globalization; using System.Security.Permissions; // class HttpModulesSection [ConfigurationCollection(typeof(HttpModuleAction))] public sealed class HttpModuleActionCollection : ConfigurationElementCollection { private static ConfigurationPropertyCollection _properties; static HttpModuleActionCollection() { // Property initialization _properties = new ConfigurationPropertyCollection(); } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } public HttpModuleActionCollection() : base(StringComparer.OrdinalIgnoreCase) { } public HttpModuleAction this[int index] { get { return (HttpModuleAction)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index, value); } } public int IndexOf(HttpModuleAction action) { return BaseIndexOf(action); } public void Add(HttpModuleAction httpModule) { BaseAdd(httpModule); } public void Remove(HttpModuleAction action) { BaseRemove(action.Key); } public void Remove(string name) { BaseRemove(name); } public void RemoveAt(int index) { BaseRemoveAt(index); } protected override ConfigurationElement CreateNewElement() { return new HttpModuleAction(); } protected override Object GetElementKey(ConfigurationElement element) { return ((HttpModuleAction)element).Key; } protected override bool IsElementRemovable(ConfigurationElement element) { HttpModuleAction module = (HttpModuleAction)element; if (BaseIndexOf(module) == -1) // does it exist? { if (HttpModuleAction.IsSpecialModuleName(module.Name)) { throw new ConfigurationErrorsException(SR.GetString( SR.Special_module_cannot_be_removed_manually, module.Name), module.FileName, module.LineNumber); } else { throw new ConfigurationErrorsException(SR.GetString( SR.Module_not_in_app, module.Name), module.FileName, module.LineNumber); } } return true; } public void Clear() { BaseClear(); } } } // 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
- Int64Storage.cs
- DecoderFallbackWithFailureFlag.cs
- ButtonColumn.cs
- ValidationErrorEventArgs.cs
- WebPartVerb.cs
- DataColumnMapping.cs
- WindowVisualStateTracker.cs
- DirectoryObjectSecurity.cs
- ObjectDataSourceFilteringEventArgs.cs
- EffectiveValueEntry.cs
- PointHitTestResult.cs
- TextModifier.cs
- CatalogZoneBase.cs
- TreeIterator.cs
- KeysConverter.cs
- Roles.cs
- ToolStripKeyboardHandlingService.cs
- WindowHideOrCloseTracker.cs
- HttpsHostedTransportConfiguration.cs
- XmlSchemaDatatype.cs
- SQLResource.cs
- TextLine.cs
- FilteredAttributeCollection.cs
- Popup.cs
- DocumentSchemaValidator.cs
- RealProxy.cs
- CopyNamespacesAction.cs
- WpfPayload.cs
- DataGridViewTextBoxEditingControl.cs
- Calendar.cs
- XmlReflectionMember.cs
- ObjectDataSourceFilteringEventArgs.cs
- xml.cs
- DataErrorValidationRule.cs
- WebPartMovingEventArgs.cs
- DataContractSerializerSection.cs
- Repeater.cs
- SpellerInterop.cs
- GridViewRowEventArgs.cs
- Baml2006KeyRecord.cs
- FixedSOMImage.cs
- DesignTimeValidationFeature.cs
- Atom10FormatterFactory.cs
- DataBoundLiteralControl.cs
- ProtocolsConfigurationHandler.cs
- TextEditorContextMenu.cs
- ImageDrawing.cs
- XmlReflectionImporter.cs
- CornerRadiusConverter.cs
- TextEvent.cs
- AssemblyAttributesGoHere.cs
- EventDescriptor.cs
- PeerInvitationResponse.cs
- InkCanvas.cs
- XmlChildNodes.cs
- X509AsymmetricSecurityKey.cs
- Interfaces.cs
- DesignerSerializationVisibilityAttribute.cs
- Membership.cs
- SettingsAttributes.cs
- ObjectViewListener.cs
- NCryptNative.cs
- ToolboxComponentsCreatingEventArgs.cs
- TriState.cs
- InputScopeNameConverter.cs
- MasterPageBuildProvider.cs
- ImportedPolicyConversionContext.cs
- CommandID.cs
- TemplatePagerField.cs
- BooleanStorage.cs
- XmlValidatingReaderImpl.cs
- UnitControl.cs
- HttpProfileBase.cs
- RandomNumberGenerator.cs
- regiisutil.cs
- SessionStateItemCollection.cs
- ConstructorBuilder.cs
- BaseHashHelper.cs
- KeyEvent.cs
- HandlerMappingMemo.cs
- IsolatedStorageFileStream.cs
- RowToFieldTransformer.cs
- SamlAuthenticationStatement.cs
- FirstMatchCodeGroup.cs
- BinaryFormatterSinks.cs
- DbConnectionStringBuilder.cs
- XsltCompileContext.cs
- ControlDesigner.cs
- PathTooLongException.cs
- DocumentCollection.cs
- MenuItemBinding.cs
- StackOverflowException.cs
- IfJoinedCondition.cs
- ChtmlTextWriter.cs
- FusionWrap.cs
- TextDecorationUnitValidation.cs
- HtmlTableCell.cs
- RegexInterpreter.cs
- GridViewDeletedEventArgs.cs
- QueryCacheKey.cs