Code:
/ FX-1434 / FX-1434 / 1.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
- Serializer.cs
- XmlCustomFormatter.cs
- ArrayElementGridEntry.cs
- TokenBasedSet.cs
- DataGridViewComboBoxColumnDesigner.cs
- InternalControlCollection.cs
- OleDbConnection.cs
- documentsequencetextview.cs
- EventWaitHandleSecurity.cs
- UndoManager.cs
- FormViewActionList.cs
- ActivationWorker.cs
- HMACRIPEMD160.cs
- TextSelectionHelper.cs
- ScriptServiceAttribute.cs
- TypeUtil.cs
- AssemblyBuilder.cs
- TransformGroup.cs
- AssemblyBuilder.cs
- ContainerActivationHelper.cs
- DocumentSequenceHighlightLayer.cs
- Literal.cs
- ActivityIdHeader.cs
- UIElement3D.cs
- ResolveRequestResponseAsyncResult.cs
- StringUtil.cs
- RepeatBehaviorConverter.cs
- XmlParserContext.cs
- ColumnResizeAdorner.cs
- COM2EnumConverter.cs
- WindowsAuthenticationModule.cs
- ADMembershipProvider.cs
- UnmanagedMemoryStream.cs
- RSAPKCS1SignatureDeformatter.cs
- TabControl.cs
- GridViewUpdateEventArgs.cs
- CompiledIdentityConstraint.cs
- ComplexLine.cs
- XmlParserContext.cs
- XmlChildEnumerator.cs
- MultiView.cs
- PeerValidationBehavior.cs
- ModuleConfigurationInfo.cs
- XmlSchemaAnyAttribute.cs
- InternalDuplexBindingElement.cs
- HttpTransportBindingElement.cs
- RadioButton.cs
- MobileUITypeEditor.cs
- StringCollection.cs
- ProtocolsConfiguration.cs
- Metafile.cs
- BitArray.cs
- ItemType.cs
- IsolationInterop.cs
- PageSettings.cs
- ProcessModuleCollection.cs
- DbConnectionHelper.cs
- EncodingTable.cs
- DataServiceClientException.cs
- tabpagecollectioneditor.cs
- unsafenativemethodsother.cs
- DomainUpDown.cs
- JsonDataContract.cs
- DependencySource.cs
- ErrorFormatterPage.cs
- safelink.cs
- DynamicResourceExtensionConverter.cs
- FixedSOMGroup.cs
- CorrelationValidator.cs
- IndentTextWriter.cs
- WmfPlaceableFileHeader.cs
- SpellCheck.cs
- RelOps.cs
- DataGridViewDataConnection.cs
- TagPrefixCollection.cs
- VisualTreeUtils.cs
- JavaScriptObjectDeserializer.cs
- SQLSingleStorage.cs
- IncrementalHitTester.cs
- OrCondition.cs
- PhysicalAddress.cs
- HuffmanTree.cs
- XmlSerializationGeneratedCode.cs
- ComplexType.cs
- PauseStoryboard.cs
- NamedPermissionSet.cs
- SchemaLookupTable.cs
- __Error.cs
- EditCommandColumn.cs
- ExpandedWrapper.cs
- DebugHandleTracker.cs
- WriteFileContext.cs
- RepeatButton.cs
- DependencyPropertyValueSerializer.cs
- TextAdaptor.cs
- ExtendedPropertyCollection.cs
- MultipleFilterMatchesException.cs
- ResponseBodyWriter.cs
- XPathMultyIterator.cs
- Shape.cs