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
- BitArray.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- FileUtil.cs
- Dispatcher.cs
- InkCanvasAutomationPeer.cs
- MessageDecoder.cs
- CombinedGeometry.cs
- PlatformCulture.cs
- ListItemCollection.cs
- DomNameTable.cs
- XmlSchemaSimpleType.cs
- DiscreteKeyFrames.cs
- XmlSchemaAny.cs
- Wrapper.cs
- EventItfInfo.cs
- ScrollChrome.cs
- RegexReplacement.cs
- EntityDataSource.cs
- ReadOnlyObservableCollection.cs
- handlecollector.cs
- xsdvalidator.cs
- MenuItemBindingCollection.cs
- SynchronizedDisposablePool.cs
- ReaderContextStackData.cs
- sqlstateclientmanager.cs
- PageThemeBuildProvider.cs
- TypeListConverter.cs
- ByteStreamGeometryContext.cs
- DataGridViewCellPaintingEventArgs.cs
- DataGridViewRowCollection.cs
- ClientUIRequest.cs
- MediaPlayer.cs
- AudioLevelUpdatedEventArgs.cs
- XamlTemplateSerializer.cs
- AuthenticatingEventArgs.cs
- PermissionToken.cs
- AnnotationObservableCollection.cs
- XmlText.cs
- ApplicationFileParser.cs
- XmlIncludeAttribute.cs
- EventLogTraceListener.cs
- TypeUtil.cs
- XMLSyntaxException.cs
- ErrorProvider.cs
- EndPoint.cs
- SessionMode.cs
- PropertyInformationCollection.cs
- ChannelEndpointElement.cs
- EmptyImpersonationContext.cs
- XmlElementAttribute.cs
- _SslState.cs
- PropertyPath.cs
- HybridCollection.cs
- Privilege.cs
- TrackBar.cs
- ComponentEditorPage.cs
- CodeLinePragma.cs
- RoleGroupCollection.cs
- PropertyStore.cs
- ResXBuildProvider.cs
- MetadataResolver.cs
- CqlLexer.cs
- XmlComplianceUtil.cs
- InternalUserCancelledException.cs
- ImageListStreamer.cs
- ColorTypeConverter.cs
- DateTimePicker.cs
- DataServiceRequestException.cs
- Hex.cs
- HttpPostLocalhostServerProtocol.cs
- WindowsStreamSecurityUpgradeProvider.cs
- HttpContextWrapper.cs
- MouseButtonEventArgs.cs
- ArrayWithOffset.cs
- Win32Exception.cs
- RawMouseInputReport.cs
- Accessible.cs
- HandledMouseEvent.cs
- SQLResource.cs
- BaseDataBoundControl.cs
- Button.cs
- EqualityComparer.cs
- ContextInformation.cs
- Membership.cs
- mediaeventshelper.cs
- CFGGrammar.cs
- DesignTimeTemplateParser.cs
- SymLanguageVendor.cs
- assertwrapper.cs
- StreamSecurityUpgradeProvider.cs
- SizeAnimationBase.cs
- RangeBaseAutomationPeer.cs
- MethodSet.cs
- UniqueIdentifierService.cs
- _SslStream.cs
- XamlSerializationHelper.cs
- InputQueue.cs
- ObjectSet.cs
- ItemDragEvent.cs
- ProtocolViolationException.cs