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
- XmlnsCompatibleWithAttribute.cs
- ConnectionStringSettings.cs
- Ticks.cs
- ConsoleTraceListener.cs
- ResourceCollectionInfo.cs
- LayoutUtils.cs
- ConstraintEnumerator.cs
- Helper.cs
- Parser.cs
- XmlSchema.cs
- TextComposition.cs
- EntityCollection.cs
- GPRECT.cs
- HwndHostAutomationPeer.cs
- EntityDataSourceView.cs
- InArgument.cs
- RoleService.cs
- CanExpandCollapseAllConverter.cs
- unsafeIndexingFilterStream.cs
- Schema.cs
- ReadOnlyNameValueCollection.cs
- PropertyTab.cs
- ThumbButtonInfoCollection.cs
- HijriCalendar.cs
- ZipFileInfoCollection.cs
- Splitter.cs
- BinHexDecoder.cs
- TableCell.cs
- EntityModelSchemaGenerator.cs
- ColumnClickEvent.cs
- ParserHooks.cs
- ClientFormsAuthenticationMembershipProvider.cs
- TextRunCacheImp.cs
- SessionStateSection.cs
- NumberEdit.cs
- CodeTypeDelegate.cs
- FieldNameLookup.cs
- XamlPoint3DCollectionSerializer.cs
- StrokeDescriptor.cs
- Activation.cs
- ProxyDataContractResolver.cs
- MSG.cs
- RoleGroupCollection.cs
- InkCollectionBehavior.cs
- LockedBorderGlyph.cs
- LocationSectionRecord.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- NetNamedPipeBindingCollectionElement.cs
- ActivityDesigner.cs
- CellNormalizer.cs
- RsaSecurityTokenParameters.cs
- AttachedPropertyBrowsableAttribute.cs
- TraceLog.cs
- OdbcInfoMessageEvent.cs
- ConfigurationManagerInternal.cs
- TreeViewTemplateSelector.cs
- VoiceInfo.cs
- InheritanceRules.cs
- OperationCanceledException.cs
- SerializationObjectManager.cs
- ListControl.cs
- TdsEnums.cs
- Double.cs
- EntityContainer.cs
- LineVisual.cs
- StateManagedCollection.cs
- MobileControlDesigner.cs
- Nullable.cs
- XmlSecureResolver.cs
- ImageField.cs
- CodeTryCatchFinallyStatement.cs
- PageClientProxyGenerator.cs
- QueryStringParameter.cs
- ObjectQuery_EntitySqlExtensions.cs
- ObjectViewFactory.cs
- ColorTransform.cs
- UnsafeNativeMethodsPenimc.cs
- ConstructorNeedsTagAttribute.cs
- MyContact.cs
- EnvironmentPermission.cs
- InlineObject.cs
- OdbcParameter.cs
- CodeIterationStatement.cs
- DbProviderFactories.cs
- CryptoKeySecurity.cs
- WebEventTraceProvider.cs
- DetailsViewInsertedEventArgs.cs
- ThreadStartException.cs
- TrackPointCollection.cs
- Lease.cs
- RubberbandSelector.cs
- PermissionSetTriple.cs
- RectangleHotSpot.cs
- DrawingContext.cs
- DependentList.cs
- PrivilegeNotHeldException.cs
- CacheChildrenQuery.cs
- HttpRawResponse.cs
- MetadataArtifactLoaderFile.cs
- SQLInt32Storage.cs