Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Configuration / BypassElementCollection.cs / 1 / BypassElementCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Configuration { using System; using System.Configuration; using System.Security.Permissions; [ConfigurationCollection(typeof(BypassElement))] public sealed class BypassElementCollection : ConfigurationElementCollection { public BypassElementCollection() { } public BypassElement this[int index] { get { return (BypassElement)BaseGet(index); } set { if (BaseGet(index) != null) { BaseRemoveAt(index); } BaseAdd(index,value); } } public new BypassElement this[string name] { get { return (BypassElement)BaseGet(name); } set { if (BaseGet(name) != null) { BaseRemove(name); } BaseAdd(value); } } public void Add(BypassElement element) { BaseAdd(element); } public void Clear() { BaseClear(); } protected override ConfigurationElement CreateNewElement() { return new BypassElement(); } protected override Object GetElementKey(ConfigurationElement element) { if (element == null) throw new ArgumentNullException("element"); return ((BypassElement)element).Key; } public int IndexOf(BypassElement element) { return BaseIndexOf(element); } public void Remove(BypassElement element) { if (element == null) throw new ArgumentNullException("element"); BaseRemove(element.Key); } public void Remove(string name) { BaseRemove(name); } public void RemoveAt(int index) { BaseRemoveAt(index); } // Since, ByPassElementCollection is a simple list with add/remove functionality, // we now never throw on duplicate entries just for this collection. This also // allows to keep Everett compatibility. // protected override bool ThrowOnDuplicate { get { return false; } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BitmapEffectInputData.cs
- ExpandableObjectConverter.cs
- SqlDataSourceEnumerator.cs
- MatrixTransform.cs
- NonClientArea.cs
- PersonalizationEntry.cs
- EditorPart.cs
- Visitors.cs
- RefType.cs
- WebServiceMethodData.cs
- NetDispatcherFaultException.cs
- XmlILIndex.cs
- DbConnectionClosed.cs
- ToolStripGrip.cs
- ToolboxBitmapAttribute.cs
- TemplatedMailWebEventProvider.cs
- VirtualDirectoryMappingCollection.cs
- Types.cs
- BooleanFunctions.cs
- DiagnosticTrace.cs
- Psha1DerivedKeyGenerator.cs
- Publisher.cs
- HttpApplication.cs
- XmlFormatExtensionPrefixAttribute.cs
- SmiSettersStream.cs
- SignedPkcs7.cs
- Privilege.cs
- XmlSchemas.cs
- RotateTransform.cs
- FixedHyperLink.cs
- ContractReference.cs
- xmlsaver.cs
- SpotLight.cs
- TextRange.cs
- DynamicPropertyHolder.cs
- ScriptBehaviorDescriptor.cs
- X509ChainPolicy.cs
- CustomAttribute.cs
- DiscoveryClientDocuments.cs
- MSG.cs
- StringUtil.cs
- ScriptServiceAttribute.cs
- ResourceBinder.cs
- LabelDesigner.cs
- ContainerAction.cs
- CollectionViewSource.cs
- FixedSOMContainer.cs
- CaseInsensitiveComparer.cs
- HtmlControl.cs
- UTF7Encoding.cs
- Crypto.cs
- CheckPair.cs
- TextReturnReader.cs
- assertwrapper.cs
- SqlDataSourceCommandEventArgs.cs
- _TransmitFileOverlappedAsyncResult.cs
- BStrWrapper.cs
- SolidColorBrush.cs
- SystemDiagnosticsSection.cs
- ProcessModelSection.cs
- TextContainerHelper.cs
- XPathEmptyIterator.cs
- DataTableReader.cs
- ImageCollectionEditor.cs
- QueryRelOp.cs
- NumberFormatInfo.cs
- Stylesheet.cs
- CreateUserWizard.cs
- Bold.cs
- OrCondition.cs
- CustomErrorsSection.cs
- ElementsClipboardData.cs
- AutomationTextAttribute.cs
- XmlDataCollection.cs
- EventDescriptor.cs
- Line.cs
- COM2ExtendedBrowsingHandler.cs
- CodeAttributeArgument.cs
- SchemaImporterExtensionsSection.cs
- DbTransaction.cs
- EntityParameterCollection.cs
- ProcessExitedException.cs
- ISAPIWorkerRequest.cs
- ColorTransformHelper.cs
- TreeNodeSelectionProcessor.cs
- LinkLabel.cs
- DataGridViewColumnHeaderCell.cs
- WebServiceReceive.cs
- DomainConstraint.cs
- AutoCompleteStringCollection.cs
- PageCatalogPart.cs
- MdImport.cs
- CacheAxisQuery.cs
- XmlWellformedWriter.cs
- SelectionProviderWrapper.cs
- DesignTimeTemplateParser.cs
- EncryptedPackageFilter.cs
- UpdateCommand.cs
- SByteStorage.cs
- TransactionScope.cs