Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / EventMappingSettingsCollection.cs / 1305376 / 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))] 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) { ConfigurationElement element = BaseGet((Object)name); return (element != null) ? BaseIndexOf(element) : -1; } public void Remove(String name) { BaseRemove(name); } public bool Contains(String name) { return (IndexOf(name) != -1); } } } // 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.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))] 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) { ConfigurationElement element = BaseGet((Object)name); return (element != null) ? BaseIndexOf(element) : -1; } public void Remove(String name) { BaseRemove(name); } public bool Contains(String name) { return (IndexOf(name) != -1); } } } // 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
- DetailsView.cs
- TypeInformation.cs
- Constraint.cs
- StylusDevice.cs
- TcpSocketManager.cs
- DynamicPropertyHolder.cs
- BuildProvidersCompiler.cs
- StrongNameUtility.cs
- DelegatingConfigHost.cs
- XPathSelfQuery.cs
- RawStylusInputCustomDataList.cs
- HtmlToClrEventProxy.cs
- DeferredRunTextReference.cs
- FontDifferentiator.cs
- CompositeControl.cs
- StateMachineWorkflowDesigner.cs
- ToolStripSplitStackLayout.cs
- TypeConverterHelper.cs
- Console.cs
- SafePointer.cs
- ResourceWriter.cs
- PrintingPermissionAttribute.cs
- _Semaphore.cs
- VectorCollectionConverter.cs
- RSAPKCS1SignatureFormatter.cs
- PageSetupDialog.cs
- StyleSelector.cs
- BamlLocalizableResource.cs
- SelectorItemAutomationPeer.cs
- TypographyProperties.cs
- FixUp.cs
- DurableDispatcherAddressingFault.cs
- DependencySource.cs
- UnauthorizedWebPart.cs
- SystemFonts.cs
- SingleSelectRootGridEntry.cs
- ClaimTypes.cs
- InlineUIContainer.cs
- ConnectionProviderAttribute.cs
- Camera.cs
- TextContainerChangedEventArgs.cs
- CustomAttributeSerializer.cs
- WindowsTokenRoleProvider.cs
- MILUtilities.cs
- CachedBitmap.cs
- SyndicationItem.cs
- DataGrid.cs
- JpegBitmapDecoder.cs
- SourceChangedEventArgs.cs
- WorkflowOperationErrorHandler.cs
- WebPartExportVerb.cs
- BevelBitmapEffect.cs
- __ComObject.cs
- RequestNavigateEventArgs.cs
- InternalUserCancelledException.cs
- CompensationToken.cs
- PlaceHolder.cs
- BlockCollection.cs
- CasesDictionary.cs
- WebConfigurationFileMap.cs
- HyperLink.cs
- ProfessionalColors.cs
- SystemWebCachingSectionGroup.cs
- ScopeElement.cs
- entityreference_tresulttype.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- ValidatorAttribute.cs
- ClonableStack.cs
- TraceUtils.cs
- TextHidden.cs
- ManagedCodeMarkers.cs
- KeyedCollection.cs
- ExtractorMetadata.cs
- EdmEntityTypeAttribute.cs
- PipeConnection.cs
- ExceptionCollection.cs
- HttpDictionary.cs
- DynamicDiscoSearcher.cs
- counter.cs
- BinaryFormatter.cs
- XpsTokenContext.cs
- PrivilegedConfigurationManager.cs
- TemplateComponentConnector.cs
- DispatcherHookEventArgs.cs
- RadioButtonAutomationPeer.cs
- Animatable.cs
- XmlDocumentType.cs
- SafeTimerHandle.cs
- MultipartContentParser.cs
- BrowserCapabilitiesCodeGenerator.cs
- XmlWriterDelegator.cs
- ToggleButtonAutomationPeer.cs
- UriSection.cs
- Cursors.cs
- XslAstAnalyzer.cs
- HttpFormatExtensions.cs
- CounterSet.cs
- InitializationEventAttribute.cs
- ConcatQueryOperator.cs
- ActivityBuilderXamlWriter.cs