Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Configuration / BypassElementCollection.cs / 1305376 / 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NamedObjectList.cs
- QueryOutputWriter.cs
- ActivityBindForm.cs
- DbFunctionCommandTree.cs
- FormViewDesigner.cs
- OrderPreservingSpoolingTask.cs
- SqlRewriteScalarSubqueries.cs
- ProtectedConfiguration.cs
- HandlerBase.cs
- SHA384.cs
- Window.cs
- DecodeHelper.cs
- ExcCanonicalXml.cs
- SeparatorAutomationPeer.cs
- WindowsToolbar.cs
- Rfc4050KeyFormatter.cs
- IsolatedStorageException.cs
- ProcessHostConfigUtils.cs
- UniqueConstraint.cs
- ExtensionFile.cs
- TimeZone.cs
- MetabaseSettingsIis7.cs
- ImageListStreamer.cs
- CompositeScriptReference.cs
- DataGridViewAccessibleObject.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- XmlILTrace.cs
- ShaderRenderModeValidation.cs
- NetworkCredential.cs
- SqlWebEventProvider.cs
- ExceptionUtil.cs
- TypeSystem.cs
- GenerateScriptTypeAttribute.cs
- EntityException.cs
- Fonts.cs
- ViewKeyConstraint.cs
- VBIdentifierNameEditor.cs
- RoleGroupCollection.cs
- NopReturnReader.cs
- MemoryFailPoint.cs
- ToolStripDropDownClosedEventArgs.cs
- X509RawDataKeyIdentifierClause.cs
- Hash.cs
- Cursors.cs
- AssemblyUtil.cs
- EllipticalNodeOperations.cs
- BitmapVisualManager.cs
- RedistVersionInfo.cs
- HtmlInputCheckBox.cs
- RootProfilePropertySettingsCollection.cs
- EntitySetBaseCollection.cs
- Assert.cs
- SerializationUtility.cs
- FormatConvertedBitmap.cs
- PagedDataSource.cs
- StylusPointPropertyInfo.cs
- Native.cs
- Rotation3DAnimation.cs
- WebPartCancelEventArgs.cs
- ScriptingSectionGroup.cs
- TextServicesCompartment.cs
- ExpressionBindingCollection.cs
- DateTimeUtil.cs
- WhereQueryOperator.cs
- ContentElement.cs
- ProcessProtocolHandler.cs
- MobileErrorInfo.cs
- SoapFormatterSinks.cs
- DBSqlParser.cs
- Memoizer.cs
- Utilities.cs
- RemotingConfiguration.cs
- SecurityContextCookieSerializer.cs
- SynchronizationLockException.cs
- HyperLinkField.cs
- XamlWrapperReaders.cs
- SlotInfo.cs
- Compiler.cs
- MediaContextNotificationWindow.cs
- datacache.cs
- SqlVersion.cs
- HttpNamespaceReservationInstallComponent.cs
- DataGridViewCellFormattingEventArgs.cs
- CalendarDataBindingHandler.cs
- RoleGroup.cs
- FileInfo.cs
- RowCache.cs
- TypeFieldSchema.cs
- clipboard.cs
- DataGridState.cs
- SequenceFullException.cs
- InvalidCommandTreeException.cs
- ServiceModelConfigurationSection.cs
- ConstraintStruct.cs
- ModelPropertyCollectionImpl.cs
- Animatable.cs
- WinInet.cs
- MarkupWriter.cs
- ReferencedCategoriesDocument.cs
- SystemInformation.cs