Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Net / System / Net / Configuration / ConnectionManagementSection.cs / 1 / ConnectionManagementSection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Net.Configuration
{
using System.Configuration;
using System.Collections;
using System.Threading;
public sealed class ConnectionManagementSection : ConfigurationSection
{
public ConnectionManagementSection()
{
this.properties.Add(this.connectionManagement);
}
[ConfigurationProperty("", IsDefaultCollection = true)]
public ConnectionManagementElementCollection ConnectionManagement
{
get { return (ConnectionManagementElementCollection)this[this.connectionManagement]; }
}
protected override ConfigurationPropertyCollection Properties
{
get { return this.properties; }
}
ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection();
readonly ConfigurationProperty connectionManagement =
new ConfigurationProperty(null, typeof(ConnectionManagementElementCollection), null,
ConfigurationPropertyOptions.IsDefaultCollection);
}
internal sealed class ConnectionManagementSectionInternal
{
internal ConnectionManagementSectionInternal(ConnectionManagementSection section)
{
if (section.ConnectionManagement.Count > 0)
{
this.connectionManagement = new Hashtable(section.ConnectionManagement.Count);
foreach(ConnectionManagementElement connectionManagementElement in section.ConnectionManagement)
{
this.connectionManagement[connectionManagementElement.Address] = connectionManagementElement.MaxConnection;
}
}
}
internal Hashtable ConnectionManagement
{
get
{
Hashtable retval = this.connectionManagement;
if (retval == null)
{
retval = new Hashtable();
}
return retval;
}
}
internal static object ClassSyncObject
{
get
{
if (classSyncObject == null)
{
object o = new object();
Interlocked.CompareExchange(ref classSyncObject, o, null);
}
return classSyncObject;
}
}
static internal ConnectionManagementSectionInternal GetSection()
{
lock (ConnectionManagementSectionInternal.ClassSyncObject)
{
ConnectionManagementSection section = PrivilegedConfigurationManager.GetSection(ConfigurationStrings.ConnectionManagementSectionPath) as ConnectionManagementSection;
if (section == null)
return null;
return new ConnectionManagementSectionInternal(section);
}
}
Hashtable connectionManagement = null;
static object classSyncObject = null;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Net.Configuration
{
using System.Configuration;
using System.Collections;
using System.Threading;
public sealed class ConnectionManagementSection : ConfigurationSection
{
public ConnectionManagementSection()
{
this.properties.Add(this.connectionManagement);
}
[ConfigurationProperty("", IsDefaultCollection = true)]
public ConnectionManagementElementCollection ConnectionManagement
{
get { return (ConnectionManagementElementCollection)this[this.connectionManagement]; }
}
protected override ConfigurationPropertyCollection Properties
{
get { return this.properties; }
}
ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection();
readonly ConfigurationProperty connectionManagement =
new ConfigurationProperty(null, typeof(ConnectionManagementElementCollection), null,
ConfigurationPropertyOptions.IsDefaultCollection);
}
internal sealed class ConnectionManagementSectionInternal
{
internal ConnectionManagementSectionInternal(ConnectionManagementSection section)
{
if (section.ConnectionManagement.Count > 0)
{
this.connectionManagement = new Hashtable(section.ConnectionManagement.Count);
foreach(ConnectionManagementElement connectionManagementElement in section.ConnectionManagement)
{
this.connectionManagement[connectionManagementElement.Address] = connectionManagementElement.MaxConnection;
}
}
}
internal Hashtable ConnectionManagement
{
get
{
Hashtable retval = this.connectionManagement;
if (retval == null)
{
retval = new Hashtable();
}
return retval;
}
}
internal static object ClassSyncObject
{
get
{
if (classSyncObject == null)
{
object o = new object();
Interlocked.CompareExchange(ref classSyncObject, o, null);
}
return classSyncObject;
}
}
static internal ConnectionManagementSectionInternal GetSection()
{
lock (ConnectionManagementSectionInternal.ClassSyncObject)
{
ConnectionManagementSection section = PrivilegedConfigurationManager.GetSection(ConfigurationStrings.ConnectionManagementSectionPath) as ConnectionManagementSection;
if (section == null)
return null;
return new ConnectionManagementSectionInternal(section);
}
}
Hashtable connectionManagement = null;
static object classSyncObject = null;
}
}
// 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
- ObjectQuery_EntitySqlExtensions.cs
- ConfigurationManagerHelper.cs
- EditCommandColumn.cs
- Stylus.cs
- DbParameterHelper.cs
- GestureRecognizer.cs
- SequentialUshortCollection.cs
- PerspectiveCamera.cs
- RemoteWebConfigurationHostStream.cs
- ClassHandlersStore.cs
- ThicknessConverter.cs
- MenuBindingsEditor.cs
- RelationshipDetailsRow.cs
- NotSupportedException.cs
- ToolStripContainerDesigner.cs
- DataGridViewMethods.cs
- FunctionImportElement.cs
- RepeaterCommandEventArgs.cs
- NullableConverter.cs
- AdornerPresentationContext.cs
- Expressions.cs
- DataGridClipboardHelper.cs
- XmlBinaryReaderSession.cs
- PersonalizablePropertyEntry.cs
- SmtpFailedRecipientException.cs
- CatalogPartCollection.cs
- WorkflowServiceNamespace.cs
- HtmlInputText.cs
- _NetworkingPerfCounters.cs
- ListSourceHelper.cs
- BasicKeyConstraint.cs
- ADMembershipUser.cs
- WaitForChangedResult.cs
- Overlapped.cs
- ReflectTypeDescriptionProvider.cs
- SystemWebSectionGroup.cs
- OpenTypeCommon.cs
- ToolZone.cs
- PointCollection.cs
- EntityExpressionVisitor.cs
- CaseExpr.cs
- NonVisualControlAttribute.cs
- MetadataItemCollectionFactory.cs
- ImageListUtils.cs
- SessionState.cs
- CodeSubDirectory.cs
- WindowInteropHelper.cs
- OneOfTypeConst.cs
- _HelperAsyncResults.cs
- TextTreeNode.cs
- ChtmlCommandAdapter.cs
- WorkflowIdleBehavior.cs
- MenuCommandService.cs
- ForwardPositionQuery.cs
- IPAddress.cs
- recordstatefactory.cs
- NavigationWindowAutomationPeer.cs
- HuffmanTree.cs
- TextFormatterContext.cs
- CallbackException.cs
- HttpContext.cs
- ColorInterpolationModeValidation.cs
- PageClientProxyGenerator.cs
- DesignerActionTextItem.cs
- MergablePropertyAttribute.cs
- GestureRecognizer.cs
- FixedPageStructure.cs
- PlainXmlWriter.cs
- Vector3D.cs
- SkewTransform.cs
- dataprotectionpermission.cs
- tabpagecollectioneditor.cs
- ClientApiGenerator.cs
- WebPartEditorOkVerb.cs
- URLIdentityPermission.cs
- FaultContractInfo.cs
- TextPointer.cs
- InputBuffer.cs
- WinEventHandler.cs
- PocoEntityKeyStrategy.cs
- StyleTypedPropertyAttribute.cs
- TimeManager.cs
- ConfigXmlText.cs
- KerberosTicketHashIdentifierClause.cs
- ItemContainerGenerator.cs
- ColumnMapProcessor.cs
- WinEventHandler.cs
- DataBoundLiteralControl.cs
- COM2Properties.cs
- GridSplitter.cs
- SystemException.cs
- TextTreeObjectNode.cs
- SchemaNotation.cs
- TemplateFactory.cs
- ActiveXContainer.cs
- SmtpReplyReader.cs
- ToolBarButtonClickEvent.cs
- CacheOutputQuery.cs
- ToolConsole.cs
- EntityModelSchemaGenerator.cs