Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Configuration / ConnectionManagementSection.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BlockCollection.cs
- ScriptManagerProxy.cs
- ObjectItemCachedAssemblyLoader.cs
- CodeExpressionCollection.cs
- SelectionItemProviderWrapper.cs
- ClaimComparer.cs
- DelayLoadType.cs
- SelectManyQueryOperator.cs
- Path.cs
- RegionIterator.cs
- ValidateNames.cs
- TableLayoutPanelResizeGlyph.cs
- DbConnectionStringBuilder.cs
- BamlVersionHeader.cs
- LogSwitch.cs
- WinFormsSpinner.cs
- PeerNearMe.cs
- figurelengthconverter.cs
- TimelineGroup.cs
- Registry.cs
- PointCollection.cs
- SqlCommandBuilder.cs
- StaticSiteMapProvider.cs
- SecurityTokenReferenceStyle.cs
- ConsoleEntryPoint.cs
- FormViewPagerRow.cs
- PeerNameRecord.cs
- RIPEMD160Managed.cs
- WorkflowRuntimeService.cs
- IsolatedStorage.cs
- Separator.cs
- BindingNavigator.cs
- UriSchemeKeyedCollection.cs
- DocumentGrid.cs
- Operator.cs
- UIInitializationException.cs
- WindowsHyperlink.cs
- WebPartZoneCollection.cs
- AsymmetricAlgorithm.cs
- EntityDataSourceViewSchema.cs
- Byte.cs
- OleDbException.cs
- ContentValidator.cs
- Message.cs
- SchemaImporter.cs
- OleDbConnectionInternal.cs
- HttpWriter.cs
- Pool.cs
- XmlSchemaAny.cs
- RequestCache.cs
- TrackBarDesigner.cs
- SimpleApplicationHost.cs
- EncryptedXml.cs
- KeyConstraint.cs
- GenerateScriptTypeAttribute.cs
- DesignBindingValueUIHandler.cs
- ContextBase.cs
- ExcCanonicalXml.cs
- StylusButton.cs
- RuleSettings.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- ServiceOperationInvoker.cs
- X509ClientCertificateAuthentication.cs
- RepeatInfo.cs
- MenuCommands.cs
- ResXResourceSet.cs
- AgileSafeNativeMemoryHandle.cs
- EntityModelSchemaGenerator.cs
- SrgsElementFactory.cs
- MsmqDiagnostics.cs
- PrintEvent.cs
- SvcMapFileSerializer.cs
- DataGridViewTopRowAccessibleObject.cs
- AdapterUtil.cs
- ObjRef.cs
- VisualBasicSettingsHandler.cs
- ProfileGroupSettingsCollection.cs
- DefaultTextStore.cs
- RequestCache.cs
- SqlParameter.cs
- EdmItemCollection.cs
- dataobject.cs
- ConstNode.cs
- EntityParameterCollection.cs
- EventMappingSettings.cs
- NativeMethods.cs
- CacheAxisQuery.cs
- PropertyBuilder.cs
- WebCategoryAttribute.cs
- InputBinding.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- HtmlInputImage.cs
- RelationshipEntry.cs
- SudsCommon.cs
- OutOfMemoryException.cs
- XmlWriterSettings.cs
- ThicknessConverter.cs
- VariableAction.cs
- XmlSignatureProperties.cs
- EntityDataSource.cs