Code:
/ FX-1434 / FX-1434 / 1.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
- XNameConverter.cs
- DocumentEventArgs.cs
- XhtmlCssHandler.cs
- HandlerMappingMemo.cs
- ImageField.cs
- LongValidator.cs
- PrintPreviewGraphics.cs
- MarkupExtensionReturnTypeAttribute.cs
- ManagedFilter.cs
- GridViewSelectEventArgs.cs
- NativeMethods.cs
- StructuredProperty.cs
- SystemDropShadowChrome.cs
- OleDbParameterCollection.cs
- CellIdBoolean.cs
- XamlSerializer.cs
- filewebresponse.cs
- XmlSerializerImportOptions.cs
- ExpressionCopier.cs
- Control.cs
- RectangleF.cs
- PropertyCondition.cs
- ListBoxChrome.cs
- InkCanvasSelectionAdorner.cs
- ConfigurationManagerInternalFactory.cs
- AsyncCompletedEventArgs.cs
- InputScopeAttribute.cs
- SafeUserTokenHandle.cs
- MulticastDelegate.cs
- TreeViewItemAutomationPeer.cs
- DescendantQuery.cs
- SmtpReplyReaderFactory.cs
- StrongNamePublicKeyBlob.cs
- Attributes.cs
- LiteralLink.cs
- CharAnimationBase.cs
- StorageMappingItemCollection.cs
- SmtpDigestAuthenticationModule.cs
- Sentence.cs
- AuthStoreRoleProvider.cs
- StyleModeStack.cs
- SoapIgnoreAttribute.cs
- FtpWebResponse.cs
- Floater.cs
- QueryStringParameter.cs
- SevenBitStream.cs
- FontDriver.cs
- CachedFontFace.cs
- PartitionResolver.cs
- RequestCachePolicy.cs
- SqlDataSourceFilteringEventArgs.cs
- Empty.cs
- OptimalTextSource.cs
- QuotedStringFormatReader.cs
- PartitionedStreamMerger.cs
- Attributes.cs
- OdbcParameter.cs
- altserialization.cs
- GestureRecognitionResult.cs
- BitSet.cs
- DrawingState.cs
- DataTemplateSelector.cs
- OracleLob.cs
- IODescriptionAttribute.cs
- SqlTypesSchemaImporter.cs
- PropertyConverter.cs
- ExtenderProviderService.cs
- StringDictionaryEditor.cs
- DocumentationServerProtocol.cs
- TrustManagerMoreInformation.cs
- DataServicePagingProviderWrapper.cs
- SHA384Managed.cs
- DataSvcMapFile.cs
- LifetimeServices.cs
- InvalidComObjectException.cs
- SmtpReplyReaderFactory.cs
- JobDuplex.cs
- ChangeBlockUndoRecord.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- IntegerFacetDescriptionElement.cs
- WebPartConnectionCollection.cs
- DataColumnChangeEvent.cs
- ImageInfo.cs
- ToolStripOverflowButton.cs
- NumberFunctions.cs
- EventTrigger.cs
- ConditionalDesigner.cs
- AutomationElementIdentifiers.cs
- XmlImplementation.cs
- LocalizabilityAttribute.cs
- Command.cs
- CanonicalFontFamilyReference.cs
- OleDbEnumerator.cs
- GlyphShapingProperties.cs
- ResizeGrip.cs
- wgx_commands.cs
- UidManager.cs
- AssemblyAssociatedContentFileAttribute.cs
- MappedMetaModel.cs
- InstanceDataCollection.cs