Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / RuleSettingsCollection.cs / 1305376 / RuleSettingsCollection.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(RuleSettings))] public sealed class RuleSettingsCollection : ConfigurationElementCollection { private static ConfigurationPropertyCollection _properties; static RuleSettingsCollection() { // Property initialization _properties = new ConfigurationPropertyCollection(); } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } public RuleSettingsCollection() { } // public properties public RuleSettings this[int index] { get { return (RuleSettings)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index, value); } } public new RuleSettings this[string key] { get { return (RuleSettings)BaseGet(key); } } protected override ConfigurationElement CreateNewElement() { return new RuleSettings(); } protected override Object GetElementKey(ConfigurationElement element) { return ((RuleSettings)element).Name; } // public methods public void Add(RuleSettings ruleSettings) { BaseAdd(ruleSettings); // 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, RuleSettings eventSettings) { BaseAdd(index, eventSettings); } public void Remove(String name) { BaseRemove(name); } public int IndexOf(String name) { ConfigurationElement element = BaseGet((Object)name); return (element != null) ? BaseIndexOf(element) : -1; } 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
- Point3D.cs
- InertiaTranslationBehavior.cs
- TextRenderingModeValidation.cs
- RawUIStateInputReport.cs
- GraphicsPathIterator.cs
- DrawingImage.cs
- GenericEnumConverter.cs
- filewebresponse.cs
- UnsafePeerToPeerMethods.cs
- RegexBoyerMoore.cs
- DesignerActionItemCollection.cs
- TypeConverterHelper.cs
- XmlSerializerNamespaces.cs
- TemplateControlCodeDomTreeGenerator.cs
- ParameterToken.cs
- OutputCacheSettingsSection.cs
- ScrollChangedEventArgs.cs
- ProcessHost.cs
- AVElementHelper.cs
- XPathSelectionIterator.cs
- EntityDataSourceQueryBuilder.cs
- QuadraticBezierSegment.cs
- TableLayoutStyleCollection.cs
- UpDownBase.cs
- SqlProviderManifest.cs
- SelectionManager.cs
- ArglessEventHandlerProxy.cs
- ProxyElement.cs
- SimpleFieldTemplateUserControl.cs
- SizeAnimationClockResource.cs
- ExpandCollapsePattern.cs
- WebSysDescriptionAttribute.cs
- WindowsScroll.cs
- JulianCalendar.cs
- Activity.cs
- CreateParams.cs
- ImplicitInputBrush.cs
- FunctionImportElement.cs
- AspCompat.cs
- ToolStripDropDownMenu.cs
- unsafenativemethodsother.cs
- CodeVariableDeclarationStatement.cs
- DataGridViewColumnTypeEditor.cs
- BufferModeSettings.cs
- PageThemeCodeDomTreeGenerator.cs
- AppDomainFactory.cs
- IncrementalReadDecoders.cs
- BitmapData.cs
- BaseHashHelper.cs
- SystemUdpStatistics.cs
- RandomNumberGenerator.cs
- __FastResourceComparer.cs
- ScrollViewerAutomationPeer.cs
- QueryOperationResponseOfT.cs
- StylusPlugin.cs
- DecoderNLS.cs
- MenuScrollingVisibilityConverter.cs
- LogLogRecordHeader.cs
- ExtensionElement.cs
- OpenTypeLayoutCache.cs
- RegexCode.cs
- SecurityPolicySection.cs
- DeviceContexts.cs
- GeometryDrawing.cs
- NativeMethods.cs
- HttpCookie.cs
- PersonalizationStateQuery.cs
- ToolTip.cs
- DataDesignUtil.cs
- ApplicationServiceManager.cs
- ListViewGroup.cs
- SQLByteStorage.cs
- SystemWebCachingSectionGroup.cs
- OracleCommandBuilder.cs
- DateTimeConverter.cs
- DynamicPropertyHolder.cs
- WebReferenceCollection.cs
- WebBrowserSiteBase.cs
- ParagraphResult.cs
- CanonicalFontFamilyReference.cs
- XmlILModule.cs
- RtType.cs
- TypePropertyEditor.cs
- EventPropertyMap.cs
- TextServicesLoader.cs
- AccessDataSource.cs
- BaseUriHelper.cs
- FixUp.cs
- DBDataPermissionAttribute.cs
- TdsParserSafeHandles.cs
- CancellationHandlerDesigner.cs
- SourceSwitch.cs
- EditorBrowsableAttribute.cs
- LostFocusEventManager.cs
- PropertyPushdownHelper.cs
- SqlNotificationRequest.cs
- Part.cs
- RandomNumberGenerator.cs
- ArgumentValidation.cs
- ReflectionUtil.cs