Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / RuleSettingsCollection.cs / 2 / 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))] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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) { return BaseIndexOf(BaseGet((Object)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
- LinqDataSourceHelper.cs
- HelpFileFileNameEditor.cs
- StrokeSerializer.cs
- LinearGradientBrush.cs
- DataGridViewRowCollection.cs
- SerializationHelper.cs
- XmlFormatWriterGenerator.cs
- DesignerView.cs
- ImageAnimator.cs
- EventLogPermissionAttribute.cs
- MetaDataInfo.cs
- ValidationSummary.cs
- versioninfo.cs
- TextBoxView.cs
- ProfileParameter.cs
- PassportIdentity.cs
- XmlEncodedRawTextWriter.cs
- TaskFileService.cs
- TypeBuilder.cs
- XmlEnumAttribute.cs
- SiteMapDataSourceView.cs
- OleDbConnectionInternal.cs
- MoveSizeWinEventHandler.cs
- HiddenField.cs
- WebConfigurationManager.cs
- HyperLink.cs
- WSFederationHttpBindingElement.cs
- XDRSchema.cs
- XmlCharType.cs
- StickyNoteHelper.cs
- SmiMetaData.cs
- MobileCategoryAttribute.cs
- BCLDebug.cs
- TagElement.cs
- InputQueue.cs
- HttpRequest.cs
- NavigatingCancelEventArgs.cs
- TextBounds.cs
- OutputCacheSettingsSection.cs
- PermissionSet.cs
- _AutoWebProxyScriptWrapper.cs
- MissingSatelliteAssemblyException.cs
- EntityDataSourceSelectedEventArgs.cs
- IdentifierCollection.cs
- SchemaTableColumn.cs
- HtmlWindowCollection.cs
- PagedControl.cs
- ProcessModule.cs
- GetPageNumberCompletedEventArgs.cs
- SystemColorTracker.cs
- DecoderReplacementFallback.cs
- XsdBuildProvider.cs
- UTF8Encoding.cs
- ScaleTransform3D.cs
- TemplatingOptionsDialog.cs
- Paragraph.cs
- WsatServiceCertificate.cs
- NameValueConfigurationElement.cs
- ToolTipService.cs
- TextBounds.cs
- ReferentialConstraint.cs
- RuntimeConfig.cs
- XmlILModule.cs
- StrokeCollectionConverter.cs
- OpCopier.cs
- ConfigLoader.cs
- SoapCodeExporter.cs
- ParallelSeparator.xaml.cs
- NTAccount.cs
- ToggleButton.cs
- RoutedPropertyChangedEventArgs.cs
- SqlGenericUtil.cs
- InputProcessorProfiles.cs
- MailDefinition.cs
- HtmlTitle.cs
- JavaScriptString.cs
- Size.cs
- DbDeleteCommandTree.cs
- HtmlTableCell.cs
- DataGridColumnCollection.cs
- Emitter.cs
- KnownTypeAttribute.cs
- GridSplitter.cs
- X509Certificate2.cs
- Assembly.cs
- MatrixValueSerializer.cs
- Lasso.cs
- DeadLetterQueue.cs
- GridViewRowEventArgs.cs
- StructuralCache.cs
- EntityDataSourceContextDisposingEventArgs.cs
- ComponentGlyph.cs
- HttpResponseHeader.cs
- LookupNode.cs
- ItemsPanelTemplate.cs
- FixedTextBuilder.cs
- TypeLoadException.cs
- IPAddressCollection.cs
- webeventbuffer.cs
- FlagsAttribute.cs