Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / HttpModuleActionCollection.cs / 3 / 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))] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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(); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IItemContainerGenerator.cs
- MailWebEventProvider.cs
- WebPartMinimizeVerb.cs
- Size3D.cs
- AuthenticationService.cs
- FileBasedResourceGroveler.cs
- AspNetSynchronizationContext.cs
- DataQuery.cs
- MessageRpc.cs
- PropertySegmentSerializer.cs
- PrefixQName.cs
- ApplicationGesture.cs
- FlowDocumentScrollViewer.cs
- figurelength.cs
- autovalidator.cs
- EqualityArray.cs
- PermissionSet.cs
- IERequestCache.cs
- ExternalFile.cs
- ReadOnlyNameValueCollection.cs
- SlipBehavior.cs
- StringArrayConverter.cs
- Utilities.cs
- PathFigureCollection.cs
- QuaternionAnimation.cs
- FloatUtil.cs
- RegexCode.cs
- ItemCheckedEvent.cs
- DodSequenceMerge.cs
- SHA512Managed.cs
- Asn1Utilities.cs
- ObjectMaterializedEventArgs.cs
- ReliableSessionBindingElementImporter.cs
- TextParagraph.cs
- MailFileEditor.cs
- NativeMethods.cs
- PrivilegedConfigurationManager.cs
- RightNameExpirationInfoPair.cs
- DecimalAnimationUsingKeyFrames.cs
- ImageListUtils.cs
- DiagnosticsConfiguration.cs
- DataRecordInternal.cs
- DockPattern.cs
- DefaultBinder.cs
- SQLInt64Storage.cs
- CachedBitmap.cs
- SemanticBasicElement.cs
- TripleDESCryptoServiceProvider.cs
- CDSsyncETWBCLProvider.cs
- BitmapData.cs
- XslVisitor.cs
- LogStore.cs
- RegexRunner.cs
- MemberDomainMap.cs
- VirtualizingPanel.cs
- MatcherBuilder.cs
- recordstatescratchpad.cs
- FacetValueContainer.cs
- SqlDataSourceCommandEventArgs.cs
- Authorization.cs
- SecurityPolicySection.cs
- ByeOperationAsyncResult.cs
- ColumnMapTranslator.cs
- ObjectConverter.cs
- DelayDesigner.cs
- SQLRoleProvider.cs
- AutoGeneratedField.cs
- CheckBox.cs
- Ipv6Element.cs
- CodeSnippetStatement.cs
- RunWorkerCompletedEventArgs.cs
- FileDialog_Vista_Interop.cs
- MailDefinitionBodyFileNameEditor.cs
- SettingsContext.cs
- Int64AnimationUsingKeyFrames.cs
- WebPartHeaderCloseVerb.cs
- ConversionHelper.cs
- FontNameConverter.cs
- SymbolType.cs
- WebColorConverter.cs
- InfoCardConstants.cs
- TextContainerChangedEventArgs.cs
- TouchFrameEventArgs.cs
- Point3DValueSerializer.cs
- TypeExtensions.cs
- SmtpFailedRecipientException.cs
- DBCSCodePageEncoding.cs
- QilFactory.cs
- DropDownList.cs
- ObjectItemAttributeAssemblyLoader.cs
- LocatorManager.cs
- WindowsToolbarAsMenu.cs
- WebPartAddingEventArgs.cs
- SaveWorkflowAsyncResult.cs
- CustomExpressionEventArgs.cs
- NetDataContractSerializer.cs
- DeflateStream.cs
- Form.cs
- LogManagementAsyncResult.cs
- RegistryDataKey.cs