Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ProviderSettingsCollection.cs / 1305376 / ProviderSettingsCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Configuration
{
using System;
using System.Xml;
using System.Configuration;
using System.Collections.Specialized;
using System.Collections;
using System.IO;
using System.Text;
using System.Globalization;
[ConfigurationCollection(typeof(ProviderSettings))]
public sealed class ProviderSettingsCollection : ConfigurationElementCollection
{
static private ConfigurationPropertyCollection _properties;
static ProviderSettingsCollection()
{
// Property initialization
_properties = new ConfigurationPropertyCollection();
}
public ProviderSettingsCollection() :
base(StringComparer.OrdinalIgnoreCase)
{
}
protected internal override ConfigurationPropertyCollection Properties
{
get
{
return _properties;
}
}
public void Add(ProviderSettings provider)
{
if (provider != null)
{
provider.UpdatePropertyCollection();
BaseAdd(provider);
}
}
public void Remove(String name)
{
BaseRemove(name);
}
public void Clear()
{
BaseClear();
}
protected override ConfigurationElement CreateNewElement()
{
return new ProviderSettings();
}
protected override Object GetElementKey(ConfigurationElement element)
{
return ((ProviderSettings)element).Name;
}
public new ProviderSettings this[string key]
{
get
{
return (ProviderSettings)BaseGet(key);
}
}
public ProviderSettings this[int index]
{
get
{
return (ProviderSettings)BaseGet(index);
}
set
{
if (BaseGet(index) != null)
BaseRemoveAt(index);
BaseAdd(index,value);
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Configuration
{
using System;
using System.Xml;
using System.Configuration;
using System.Collections.Specialized;
using System.Collections;
using System.IO;
using System.Text;
using System.Globalization;
[ConfigurationCollection(typeof(ProviderSettings))]
public sealed class ProviderSettingsCollection : ConfigurationElementCollection
{
static private ConfigurationPropertyCollection _properties;
static ProviderSettingsCollection()
{
// Property initialization
_properties = new ConfigurationPropertyCollection();
}
public ProviderSettingsCollection() :
base(StringComparer.OrdinalIgnoreCase)
{
}
protected internal override ConfigurationPropertyCollection Properties
{
get
{
return _properties;
}
}
public void Add(ProviderSettings provider)
{
if (provider != null)
{
provider.UpdatePropertyCollection();
BaseAdd(provider);
}
}
public void Remove(String name)
{
BaseRemove(name);
}
public void Clear()
{
BaseClear();
}
protected override ConfigurationElement CreateNewElement()
{
return new ProviderSettings();
}
protected override Object GetElementKey(ConfigurationElement element)
{
return ((ProviderSettings)element).Name;
}
public new ProviderSettings this[string key]
{
get
{
return (ProviderSettings)BaseGet(key);
}
}
public ProviderSettings this[int index]
{
get
{
return (ProviderSettings)BaseGet(index);
}
set
{
if (BaseGet(index) != null)
BaseRemoveAt(index);
BaseAdd(index,value);
}
}
}
}
// 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
- InvalidateEvent.cs
- HttpException.cs
- LinqDataSourceView.cs
- _CookieModule.cs
- Button.cs
- HtmlFormAdapter.cs
- IndexerNameAttribute.cs
- BooleanSwitch.cs
- MaskedTextProvider.cs
- UnsafeNativeMethods.cs
- BamlRecordWriter.cs
- HttpChannelFactory.cs
- NamespaceInfo.cs
- DiagnosticsConfiguration.cs
- NavigationPropertyEmitter.cs
- PrincipalPermission.cs
- UnmanagedMemoryStreamWrapper.cs
- IgnoreDeviceFilterElement.cs
- TrustManagerPromptUI.cs
- WriteTimeStream.cs
- TaskFileService.cs
- WorkflowServiceAttributes.cs
- EventSinkHelperWriter.cs
- ICollection.cs
- DoubleLink.cs
- StyleModeStack.cs
- QilPatternVisitor.cs
- prefixendpointaddressmessagefiltertable.cs
- ClipboardData.cs
- DataGridViewRowEventArgs.cs
- KeyedCollection.cs
- XmlSchemaComplexContentExtension.cs
- ActivityDelegate.cs
- FreezableDefaultValueFactory.cs
- SchemaCollectionCompiler.cs
- SimpleWebHandlerParser.cs
- WsdlParser.cs
- ClientScriptManagerWrapper.cs
- XhtmlBasicImageAdapter.cs
- UIAgentMonitor.cs
- ConfigXmlWhitespace.cs
- DateTimeFormatInfoScanner.cs
- TemplateXamlParser.cs
- NavigateEvent.cs
- SystemResourceHost.cs
- SynchronousChannelMergeEnumerator.cs
- Queue.cs
- webeventbuffer.cs
- PerspectiveCamera.cs
- LingerOption.cs
- PbrsForward.cs
- WebPartMenuStyle.cs
- TypeUtil.cs
- TemplateKey.cs
- FlowLayoutPanel.cs
- LinqDataSourceContextData.cs
- DragSelectionMessageFilter.cs
- SqlConnectionString.cs
- TextTreeTextElementNode.cs
- HGlobalSafeHandle.cs
- DataGridViewCellValueEventArgs.cs
- DeleteHelper.cs
- CatalogPartCollection.cs
- Sql8ConformanceChecker.cs
- ErrorFormatter.cs
- CodeMemberEvent.cs
- XmlSchemaAnyAttribute.cs
- Deflater.cs
- FixedFlowMap.cs
- ControlFilterExpression.cs
- PasswordDeriveBytes.cs
- PointLightBase.cs
- XPathScanner.cs
- AccessibleObject.cs
- HttpModuleActionCollection.cs
- XmlSignatureProperties.cs
- ClientTargetSection.cs
- EventLogPermissionAttribute.cs
- StdValidatorsAndConverters.cs
- _AutoWebProxyScriptWrapper.cs
- Native.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- SystemIPInterfaceProperties.cs
- Matrix.cs
- DataControlLinkButton.cs
- PropertyPushdownHelper.cs
- ProviderBase.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ZipIOCentralDirectoryBlock.cs
- DummyDataSource.cs
- IdentityNotMappedException.cs
- SqlDataSourceView.cs
- ConfigXmlWhitespace.cs
- Parallel.cs
- TraceRecord.cs
- HandlerBase.cs
- WebPartZoneDesigner.cs
- ITreeGenerator.cs
- ZoneMembershipCondition.cs
- CompositeCollection.cs