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
- SystemColorTracker.cs
- ButtonFlatAdapter.cs
- SimpleType.cs
- IsolatedStorageException.cs
- TouchEventArgs.cs
- XmlAtomicValue.cs
- PublishLicense.cs
- ProcessHost.cs
- NullableBoolConverter.cs
- EncodingNLS.cs
- AttachedPropertyBrowsableAttribute.cs
- OrderedDictionaryStateHelper.cs
- StateMachineWorkflow.cs
- SystemFonts.cs
- PrintControllerWithStatusDialog.cs
- PathGradientBrush.cs
- AdapterSwitches.cs
- WrappedOptions.cs
- Matrix3D.cs
- SortFieldComparer.cs
- WebPartUtil.cs
- UIntPtr.cs
- MultiTargetingUtil.cs
- CodeCommentStatementCollection.cs
- OdbcError.cs
- DbProviderFactory.cs
- JsonStringDataContract.cs
- CollectionChange.cs
- BuilderPropertyEntry.cs
- ADRoleFactory.cs
- WaitHandleCannotBeOpenedException.cs
- PropertyOrder.cs
- DataObjectFieldAttribute.cs
- MetadataPropertyCollection.cs
- PreservationFileWriter.cs
- ToolBar.cs
- ParenthesizePropertyNameAttribute.cs
- ToolStripPanel.cs
- HtmlEmptyTagControlBuilder.cs
- DebugView.cs
- SponsorHelper.cs
- SizeValueSerializer.cs
- StrokeNodeData.cs
- GrammarBuilderBase.cs
- PanelStyle.cs
- TextSimpleMarkerProperties.cs
- ListArgumentProvider.cs
- WebPartDescription.cs
- StringValidatorAttribute.cs
- ComponentEvent.cs
- TextEditorCopyPaste.cs
- XmlIterators.cs
- MemoryMappedViewAccessor.cs
- TextEndOfParagraph.cs
- UdpAnnouncementEndpoint.cs
- GroupBoxRenderer.cs
- ObjectTag.cs
- TrackingParameters.cs
- ResourceDictionary.cs
- UseLicense.cs
- ImageSource.cs
- ToggleButtonAutomationPeer.cs
- DataGridViewTextBoxCell.cs
- ToolboxComponentsCreatingEventArgs.cs
- Soap.cs
- CodeAttributeArgument.cs
- JsonFormatWriterGenerator.cs
- DataGridRelationshipRow.cs
- MDIControlStrip.cs
- ScaleTransform3D.cs
- ListItemCollection.cs
- CAGDesigner.cs
- SiteMap.cs
- FastEncoder.cs
- ActiveXHelper.cs
- RepeaterCommandEventArgs.cs
- AxHostDesigner.cs
- ListViewSelectEventArgs.cs
- SeverityFilter.cs
- ObjectAnimationBase.cs
- SessionIDManager.cs
- TabletDeviceInfo.cs
- SqlConnection.cs
- DocumentApplicationJournalEntry.cs
- FrameworkContextData.cs
- FirstMatchCodeGroup.cs
- QilNode.cs
- AncestorChangedEventArgs.cs
- NewItemsContextMenuStrip.cs
- ServicesSection.cs
- BamlWriter.cs
- FontWeight.cs
- ArithmeticLiteral.cs
- DesignerSerializerAttribute.cs
- NamedPipeTransportSecurity.cs
- WebPartEditorCancelVerb.cs
- TimeoutHelper.cs
- TemplateControlCodeDomTreeGenerator.cs
- WmlPhoneCallAdapter.cs
- ActivityValidator.cs