Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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
- SettingsProviderCollection.cs
- UrlPropertyAttribute.cs
- ACL.cs
- ListControl.cs
- RelativeSource.cs
- MobileUITypeEditor.cs
- RelatedEnd.cs
- DesignerView.cs
- CatalogPartCollection.cs
- AsyncPostBackTrigger.cs
- ParserExtension.cs
- StylusPointPropertyUnit.cs
- SemaphoreSecurity.cs
- XmlUrlResolver.cs
- SchemaElementDecl.cs
- DrawingState.cs
- QueryStringParameter.cs
- PolygonHotSpot.cs
- cookieexception.cs
- UnionCodeGroup.cs
- SqlDataSourceCommandParser.cs
- DataRowExtensions.cs
- XmlCodeExporter.cs
- CoreSwitches.cs
- Wildcard.cs
- Regex.cs
- Selection.cs
- CodeNamespaceCollection.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- StandardCommands.cs
- ToolTipAutomationPeer.cs
- CustomBindingElement.cs
- DefaultProxySection.cs
- TransformProviderWrapper.cs
- isolationinterop.cs
- WorkflowApplicationEventArgs.cs
- TreeNodeBinding.cs
- TransactionProtocolConverter.cs
- ListDataBindEventArgs.cs
- CodeSnippetExpression.cs
- _SafeNetHandles.cs
- ExtendedPropertyDescriptor.cs
- ActiveXSite.cs
- UnhandledExceptionEventArgs.cs
- ServiceCredentials.cs
- ReadOnlyAttribute.cs
- TableRow.cs
- SEHException.cs
- CrossSiteScriptingValidation.cs
- RangeValidator.cs
- WebSysDisplayNameAttribute.cs
- _FtpControlStream.cs
- PowerStatus.cs
- CreatingCookieEventArgs.cs
- X509CertificateClaimSet.cs
- XmlSchemaObjectCollection.cs
- RangeValidator.cs
- SoapIncludeAttribute.cs
- KeyProperty.cs
- Composition.cs
- RowToFieldTransformer.cs
- BaseCodePageEncoding.cs
- LogReservationCollection.cs
- StringStorage.cs
- MaskedTextProvider.cs
- OutputCacheSection.cs
- MenuItemStyle.cs
- IImplicitResourceProvider.cs
- HtmlWindowCollection.cs
- ListViewUpdateEventArgs.cs
- SqlGenericUtil.cs
- HtmlTextArea.cs
- ConditionChanges.cs
- DataGridViewCellStyleChangedEventArgs.cs
- ExpressionWriter.cs
- SqlNotificationEventArgs.cs
- ADConnectionHelper.cs
- FixedFindEngine.cs
- RemotingConfiguration.cs
- OleDbFactory.cs
- CallbackHandler.cs
- ListChangedEventArgs.cs
- Executor.cs
- WebGetAttribute.cs
- DataRecord.cs
- Privilege.cs
- OleDbDataAdapter.cs
- PersistencePipeline.cs
- UseLicense.cs
- StringConverter.cs
- ValidationError.cs
- StringDictionary.cs
- File.cs
- ConstructorNeedsTagAttribute.cs
- FormsAuthenticationCredentials.cs
- SchemaElementDecl.cs
- TaskCanceledException.cs
- TimeSpanStorage.cs
- SecurityPermission.cs
- SHA256.cs