Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / EventMappingSettingsCollection.cs / 2 / EventMappingSettingsCollection.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.ComponentModel; using System.Web.Hosting; using System.Web.Util; using System.Web.Configuration; using System.Web.Management; using System.Web.Compilation; using System.Security.Permissions; [ConfigurationCollection(typeof(EventMappingSettings))] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class EventMappingSettingsCollection : ConfigurationElementCollection { private static ConfigurationPropertyCollection _properties; static EventMappingSettingsCollection() { // Property initialization _properties = new ConfigurationPropertyCollection(); } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } public EventMappingSettingsCollection() { } public new EventMappingSettings this[string key] { get { return (EventMappingSettings)BaseGet(key); } } // public properties public EventMappingSettings this[int index] { get { return (EventMappingSettings)BaseGet(index); } set { if (BaseGet(index) != null) BaseRemoveAt(index); BaseAdd(index, value); } } // Protected Overrides protected override ConfigurationElement CreateNewElement() { return new EventMappingSettings(); } protected override Object GetElementKey(ConfigurationElement element) { return ((EventMappingSettings)element).Name; } // public methods public void Add(EventMappingSettings eventMappingSettings) { BaseAdd(eventMappingSettings); // add to the end of the list and dont overwrite dups! } public void Clear() { BaseClear(); } public void RemoveAt(int index) { BaseRemoveAt(index); } public void Insert(int index, EventMappingSettings eventMappingSettings) { BaseAdd(index, eventMappingSettings); } public int IndexOf(String name) { return BaseIndexOf(BaseGet((Object)name)); } public void Remove(String name) { BaseRemove(name); } public bool Contains(String name) { return (IndexOf(name) != -1); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebPartActionVerb.cs
- DataGridViewCellParsingEventArgs.cs
- PropertyEmitter.cs
- TypeRestriction.cs
- DateTimeConstantAttribute.cs
- EventHandlersStore.cs
- XmlSchemaComplexContentRestriction.cs
- TextAutomationPeer.cs
- CollaborationHelperFunctions.cs
- AuthenticatingEventArgs.cs
- XmlValidatingReader.cs
- Char.cs
- FixedSOMElement.cs
- GenerateTemporaryTargetAssembly.cs
- xamlnodes.cs
- FunctionMappingTranslator.cs
- CalendarSelectionChangedEventArgs.cs
- DecimalConverter.cs
- ExpressionBuilder.cs
- MsmqIntegrationBindingElement.cs
- NotificationContext.cs
- _DigestClient.cs
- ConnectionPoint.cs
- DBDataPermissionAttribute.cs
- AssemblyNameProxy.cs
- EnumBuilder.cs
- ImageMap.cs
- CharAnimationUsingKeyFrames.cs
- FormsAuthenticationModule.cs
- WebServiceEnumData.cs
- DiffuseMaterial.cs
- Timer.cs
- TextEditorMouse.cs
- VectorKeyFrameCollection.cs
- FlatButtonAppearance.cs
- CodeAttachEventStatement.cs
- DateTimeParse.cs
- HWStack.cs
- TypeInfo.cs
- DataGridViewTopLeftHeaderCell.cs
- ConfigXmlText.cs
- GridViewRow.cs
- TableItemPattern.cs
- TableItemPattern.cs
- ValueExpressions.cs
- DbConnectionPoolGroupProviderInfo.cs
- ResourceDefaultValueAttribute.cs
- InputLangChangeRequestEvent.cs
- AdornerHitTestResult.cs
- WindowsStatic.cs
- CheckBox.cs
- StateElement.cs
- DelegateTypeInfo.cs
- ChannelBinding.cs
- StringPropertyBuilder.cs
- TraceHandler.cs
- _LazyAsyncResult.cs
- SubstitutionResponseElement.cs
- LookupBindingPropertiesAttribute.cs
- ToolStripContentPanelDesigner.cs
- ContentOnlyMessage.cs
- FileUtil.cs
- RegistryDataKey.cs
- ColorConvertedBitmap.cs
- TdsParserSafeHandles.cs
- DataGridViewHitTestInfo.cs
- SchemaMapping.cs
- RotateTransform.cs
- RowToParametersTransformer.cs
- UserControlParser.cs
- CollectionConverter.cs
- DbConnectionInternal.cs
- XmlMembersMapping.cs
- SettingsProperty.cs
- FileDialogCustomPlacesCollection.cs
- ProcessThreadCollection.cs
- HostedElements.cs
- Descriptor.cs
- DbProviderServices.cs
- ItemCheckEvent.cs
- GridViewColumnCollection.cs
- PenCursorManager.cs
- InvokeWebService.cs
- TextViewSelectionProcessor.cs
- WebPartTransformer.cs
- OleDbCommand.cs
- UIntPtr.cs
- RuntimeVariableList.cs
- Matrix3DStack.cs
- XmlCharacterData.cs
- XmlSerializerNamespaces.cs
- SchemaNotation.cs
- TextDecoration.cs
- TypeForwardedToAttribute.cs
- RelatedView.cs
- MappedMetaModel.cs
- TraceXPathNavigator.cs
- ProfileParameter.cs
- TagPrefixCollection.cs
- DoubleKeyFrameCollection.cs