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
- AnonymousIdentificationModule.cs
- UnionCodeGroup.cs
- DataBinder.cs
- TableLayoutRowStyleCollection.cs
- BatchWriter.cs
- ClientBuildManager.cs
- DivideByZeroException.cs
- HttpResponse.cs
- PersonalizationProviderHelper.cs
- DrawItemEvent.cs
- NativeMethods.cs
- objectquery_tresulttype.cs
- BooleanSwitch.cs
- XmlSortKey.cs
- CodeIndexerExpression.cs
- WebExceptionStatus.cs
- MetadataHelper.cs
- CompiledQueryCacheKey.cs
- VerificationAttribute.cs
- ExclusiveCanonicalizationTransform.cs
- XamlTypeMapperSchemaContext.cs
- DBParameter.cs
- XmlNodeChangedEventArgs.cs
- FocusWithinProperty.cs
- XmlSerializableWriter.cs
- CustomValidator.cs
- BuildResultCache.cs
- ShaperBuffers.cs
- EntityDataSourceSelectingEventArgs.cs
- XmlBoundElement.cs
- TreeViewEvent.cs
- GAC.cs
- SoapSchemaImporter.cs
- ApplyTemplatesAction.cs
- GlobalProxySelection.cs
- HwndMouseInputProvider.cs
- MessageBox.cs
- ValidationHelper.cs
- SQLInt32Storage.cs
- XmlMemberMapping.cs
- MouseActionConverter.cs
- SqlBulkCopyColumnMappingCollection.cs
- DataErrorValidationRule.cs
- SQLInt64.cs
- Stroke2.cs
- basecomparevalidator.cs
- EventToken.cs
- SmtpNegotiateAuthenticationModule.cs
- LocalTransaction.cs
- Property.cs
- ReflectionUtil.cs
- ValueTypeFixupInfo.cs
- CodeSubDirectory.cs
- XmlNamespaceDeclarationsAttribute.cs
- PerfCounterSection.cs
- LogArchiveSnapshot.cs
- WebPartConnectionsCancelVerb.cs
- PerformanceCounterPermissionAttribute.cs
- TextRangeEditLists.cs
- Activity.cs
- DataBindingList.cs
- InputLanguageSource.cs
- ReadOnlyNameValueCollection.cs
- CheckBoxFlatAdapter.cs
- SwitchElementsCollection.cs
- TextTreeInsertUndoUnit.cs
- FormsAuthenticationModule.cs
- Array.cs
- FileLevelControlBuilderAttribute.cs
- StateFinalizationActivity.cs
- WeakHashtable.cs
- CompilerLocalReference.cs
- MenuAutomationPeer.cs
- SimpleExpression.cs
- SiteMapDataSource.cs
- ContainerSelectorActiveEvent.cs
- SQLInt32.cs
- ColorPalette.cs
- EmbeddedObject.cs
- ItemList.cs
- Menu.cs
- SynchronizedDispatch.cs
- SmtpFailedRecipientException.cs
- SchemaExporter.cs
- XmlSchemaRedefine.cs
- TemplateInstanceAttribute.cs
- AdornerDecorator.cs
- SimpleBitVector32.cs
- XmlHierarchyData.cs
- TreeView.cs
- EntityKeyElement.cs
- XmlWrappingReader.cs
- WebControlAdapter.cs
- XsltException.cs
- GACMembershipCondition.cs
- HiddenField.cs
- MatrixStack.cs
- ParameterToken.cs
- AncillaryOps.cs
- MemberRestriction.cs