Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Configuration / WebRequestModuleElementCollection.cs / 1305376 / WebRequestModuleElementCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Net.Configuration
{
using System;
using System.Configuration;
using System.Security.Permissions;
[ConfigurationCollection(typeof(WebRequestModuleElement))]
public sealed class WebRequestModuleElementCollection : ConfigurationElementCollection
{
public WebRequestModuleElementCollection()
{
}
public WebRequestModuleElement this[int index]
{
get
{
return (WebRequestModuleElement)BaseGet(index);
}
set
{
if (BaseGet(index) != null)
{
BaseRemoveAt(index);
}
BaseAdd(index,value);
}
}
public new WebRequestModuleElement this[string name]
{
get
{
return (WebRequestModuleElement)BaseGet(name);
}
set
{
if (BaseGet(name) != null)
{
BaseRemove(name);
}
BaseAdd(value);
}
}
public void Add(WebRequestModuleElement element)
{
BaseAdd(element);
}
public void Clear()
{
BaseClear();
}
protected override ConfigurationElement CreateNewElement()
{
return new WebRequestModuleElement();
}
protected override Object GetElementKey(ConfigurationElement element)
{
if (element == null)
throw new ArgumentNullException("element");
return ((WebRequestModuleElement)element).Key;
}
public int IndexOf(WebRequestModuleElement element)
{
return BaseIndexOf(element);
}
public void Remove(WebRequestModuleElement 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);
}
}
}
// 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(WebRequestModuleElement))]
public sealed class WebRequestModuleElementCollection : ConfigurationElementCollection
{
public WebRequestModuleElementCollection()
{
}
public WebRequestModuleElement this[int index]
{
get
{
return (WebRequestModuleElement)BaseGet(index);
}
set
{
if (BaseGet(index) != null)
{
BaseRemoveAt(index);
}
BaseAdd(index,value);
}
}
public new WebRequestModuleElement this[string name]
{
get
{
return (WebRequestModuleElement)BaseGet(name);
}
set
{
if (BaseGet(name) != null)
{
BaseRemove(name);
}
BaseAdd(value);
}
}
public void Add(WebRequestModuleElement element)
{
BaseAdd(element);
}
public void Clear()
{
BaseClear();
}
protected override ConfigurationElement CreateNewElement()
{
return new WebRequestModuleElement();
}
protected override Object GetElementKey(ConfigurationElement element)
{
if (element == null)
throw new ArgumentNullException("element");
return ((WebRequestModuleElement)element).Key;
}
public int IndexOf(WebRequestModuleElement element)
{
return BaseIndexOf(element);
}
public void Remove(WebRequestModuleElement 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);
}
}
}
// 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
- SqlDataSourceFilteringEventArgs.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- DesignerCategoryAttribute.cs
- OletxDependentTransaction.cs
- HttpConfigurationSystem.cs
- CellParaClient.cs
- RowBinding.cs
- HTTPNotFoundHandler.cs
- PeerNearMe.cs
- VirtualDirectoryMappingCollection.cs
- HiddenField.cs
- SqlRewriteScalarSubqueries.cs
- BaseParagraph.cs
- MultiAsyncResult.cs
- SqlDataSourceView.cs
- ToolStripContentPanelRenderEventArgs.cs
- SecurityPolicySection.cs
- LinkDescriptor.cs
- filewebrequest.cs
- CopyOfAction.cs
- CaseCqlBlock.cs
- TimeIntervalCollection.cs
- PlanCompilerUtil.cs
- RadioButton.cs
- Error.cs
- DataObjectMethodAttribute.cs
- RegexCharClass.cs
- UseAttributeSetsAction.cs
- DrawingGroupDrawingContext.cs
- ToolboxCategory.cs
- Visual3D.cs
- AttachmentCollection.cs
- XPathNodePointer.cs
- BaseUriHelper.cs
- NativeRecognizer.cs
- RawStylusInputCustomData.cs
- PropertyChangedEventArgs.cs
- AutomationPatternInfo.cs
- DataComponentGenerator.cs
- EdmType.cs
- FixedTextView.cs
- MasterPage.cs
- ColorTranslator.cs
- DesignTimeParseData.cs
- SerializationHelper.cs
- ContextMenu.cs
- LinkConverter.cs
- DivideByZeroException.cs
- PropertySourceInfo.cs
- ImageMapEventArgs.cs
- ResponseStream.cs
- Style.cs
- HtmlInputRadioButton.cs
- Int32.cs
- While.cs
- EdmType.cs
- VisualProxy.cs
- RawStylusSystemGestureInputReport.cs
- ExecutorLocksHeldException.cs
- InvalidAsynchronousStateException.cs
- StringAttributeCollection.cs
- BitmapMetadataEnumerator.cs
- _HTTPDateParse.cs
- XmlResolver.cs
- XmlSchemaAnyAttribute.cs
- JoinElimination.cs
- AsyncResult.cs
- ColumnClickEvent.cs
- PropertyDescriptorComparer.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- _LocalDataStore.cs
- RepeaterItem.cs
- GridViewSelectEventArgs.cs
- RangeValidator.cs
- ModuleElement.cs
- FillBehavior.cs
- MouseGesture.cs
- PropertySegmentSerializer.cs
- Container.cs
- StrokeNodeOperations.cs
- Interlocked.cs
- PiiTraceSource.cs
- Vector3DAnimation.cs
- AsyncPostBackErrorEventArgs.cs
- WCFServiceClientProxyGenerator.cs
- HttpResponseInternalWrapper.cs
- NetworkInformationPermission.cs
- UpdatePanelTriggerCollection.cs
- XmlSchemaAny.cs
- TextElementCollectionHelper.cs
- BitmapFrameEncode.cs
- _Win32.cs
- ObjectToIdCache.cs
- WizardSideBarListControlItem.cs
- DataGridViewLinkColumn.cs
- EventHandlerList.cs
- UserPersonalizationStateInfo.cs
- Unit.cs
- ResourceManager.cs
- RepeatEnumerable.cs