Code:
/ FX-1434 / FX-1434 / 1.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
- XmlSecureResolver.cs
- GenericTypeParameterConverter.cs
- BamlVersionHeader.cs
- AnonymousIdentificationSection.cs
- SqlMetaData.cs
- SqlCommandSet.cs
- PropertyMetadata.cs
- RepeaterDataBoundAdapter.cs
- StructuredType.cs
- FileSecurity.cs
- TableLayoutPanel.cs
- EventData.cs
- ToolBarOverflowPanel.cs
- XmlTextReaderImpl.cs
- TextEditorCharacters.cs
- DocumentViewer.cs
- PeerNameResolver.cs
- Drawing.cs
- WebReferencesBuildProvider.cs
- HttpModuleActionCollection.cs
- ResourcesChangeInfo.cs
- DateTimeSerializationSection.cs
- COM2TypeInfoProcessor.cs
- CmsInterop.cs
- ObjectQueryProvider.cs
- TimeSpanValidator.cs
- Context.cs
- ComponentCommands.cs
- Ipv6Element.cs
- _ConnectOverlappedAsyncResult.cs
- ErrorFormatter.cs
- TextDecoration.cs
- CornerRadius.cs
- CodeSubDirectory.cs
- VectorCollection.cs
- Variable.cs
- DynamicDataRouteHandler.cs
- DataGridRelationshipRow.cs
- DataListItemEventArgs.cs
- StrokeSerializer.cs
- WsatProxy.cs
- TextElementAutomationPeer.cs
- counter.cs
- SimpleTextLine.cs
- DoubleUtil.cs
- NavigateEvent.cs
- SqlDelegatedTransaction.cs
- ActivityCodeGenerator.cs
- UmAlQuraCalendar.cs
- TdsParserSafeHandles.cs
- CurrencyManager.cs
- MemoryMappedViewAccessor.cs
- TriggerActionCollection.cs
- ContentDefinition.cs
- HttpWebResponse.cs
- XmlDocumentFieldSchema.cs
- XmlSchemaException.cs
- HtmlInputPassword.cs
- Models.cs
- SafeNativeMethods.cs
- EncodingDataItem.cs
- SHA384Managed.cs
- X509CertificateValidationMode.cs
- HyperLinkColumn.cs
- ConnectorSelectionGlyph.cs
- OciLobLocator.cs
- BasicViewGenerator.cs
- SQLInt64Storage.cs
- StyleSelector.cs
- InternalPermissions.cs
- ThemeConfigurationDialog.cs
- AtlasWeb.Designer.cs
- Point3DCollection.cs
- ComplexObject.cs
- OdbcDataReader.cs
- SerializationInfo.cs
- BindingListCollectionView.cs
- RegularExpressionValidator.cs
- PropertyNames.cs
- BatchServiceHost.cs
- ScrollEventArgs.cs
- DataGridViewImageCell.cs
- DbSource.cs
- DataBindingCollection.cs
- DoubleAnimation.cs
- Publisher.cs
- DataSourceCache.cs
- MappingItemCollection.cs
- Bits.cs
- SerializationEventsCache.cs
- ElementHostAutomationPeer.cs
- TagMapInfo.cs
- IdentityReference.cs
- _AutoWebProxyScriptWrapper.cs
- XmlSchemaParticle.cs
- OdbcPermission.cs
- CreatingCookieEventArgs.cs
- StyleSelector.cs
- TextDocumentView.cs
- FolderNameEditor.cs