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
- ProtectedProviderSettings.cs
- WebServiceData.cs
- DataGridHeaderBorder.cs
- ViewGenResults.cs
- AppLevelCompilationSectionCache.cs
- PermissionSetTriple.cs
- CodeThrowExceptionStatement.cs
- ProcessProtocolHandler.cs
- ObfuscationAttribute.cs
- KeyboardDevice.cs
- PublisherMembershipCondition.cs
- ActiveXSite.cs
- FlagsAttribute.cs
- ExpressionNode.cs
- RichTextBox.cs
- OleDbTransaction.cs
- LinqDataSourceValidationException.cs
- NullableDecimalSumAggregationOperator.cs
- AffineTransform3D.cs
- ICspAsymmetricAlgorithm.cs
- ISFClipboardData.cs
- Classification.cs
- Message.cs
- BaseInfoTable.cs
- EventWaitHandleSecurity.cs
- PointValueSerializer.cs
- xmlglyphRunInfo.cs
- ImageMapEventArgs.cs
- CfgSemanticTag.cs
- CommandCollectionEditor.cs
- DesignerDataTable.cs
- ToolboxItemFilterAttribute.cs
- TextDecorationCollection.cs
- GridViewEditEventArgs.cs
- input.cs
- SafePEFileHandle.cs
- AuthStoreRoleProvider.cs
- ObjectView.cs
- DictionarySectionHandler.cs
- SmtpClient.cs
- RSAPKCS1KeyExchangeFormatter.cs
- AtomEntry.cs
- validation.cs
- Literal.cs
- Table.cs
- TextBoxAutomationPeer.cs
- FramingEncoders.cs
- BatchParser.cs
- DbConnectionPoolGroupProviderInfo.cs
- EmbeddedMailObjectCollectionEditor.cs
- OleDbSchemaGuid.cs
- ColorTransform.cs
- CompositionAdorner.cs
- MessageSecurityOverHttpElement.cs
- peernodestatemanager.cs
- AutomationElementCollection.cs
- HScrollBar.cs
- TextRunTypographyProperties.cs
- PropertyBuilder.cs
- PagedDataSource.cs
- DataSourceControl.cs
- InvalidFilterCriteriaException.cs
- HttpRequestCacheValidator.cs
- DataServiceProviderWrapper.cs
- SemanticAnalyzer.cs
- HttpRuntime.cs
- BlobPersonalizationState.cs
- StringWriter.cs
- DecryptedHeader.cs
- CharEnumerator.cs
- CursorInteropHelper.cs
- SafeCertificateStore.cs
- HitTestParameters3D.cs
- EventTrigger.cs
- BinaryCommonClasses.cs
- ApplicationDirectory.cs
- OleDbConnection.cs
- FileDialog_Vista_Interop.cs
- DisplayToken.cs
- MsmqIntegrationMessagePool.cs
- ObjectQueryState.cs
- BrowserInteropHelper.cs
- ProxyAttribute.cs
- DataGridCaption.cs
- SimpleType.cs
- WebSysDescriptionAttribute.cs
- SmiMetaData.cs
- DependencyPropertyDescriptor.cs
- WebServiceErrorEvent.cs
- ThreadPool.cs
- SmtpSection.cs
- MemberMemberBinding.cs
- ExclusiveCanonicalizationTransform.cs
- Help.cs
- OracleTimeSpan.cs
- SqlMethodTransformer.cs
- WindowsAuthenticationModule.cs
- AppDomainUnloadedException.cs
- WebSysDescriptionAttribute.cs
- HMACRIPEMD160.cs