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
- DurableInstanceContextProvider.cs
- ChannelSinkStacks.cs
- XmlSchemaAnnotated.cs
- ArrayConverter.cs
- PageAdapter.cs
- InputMethodStateTypeInfo.cs
- GlobalEventManager.cs
- PanelStyle.cs
- CatalogZoneBase.cs
- DataSourceControl.cs
- securitymgrsite.cs
- CryptoApi.cs
- HttpBrowserCapabilitiesBase.cs
- InputLanguageManager.cs
- SyntaxCheck.cs
- SafeMemoryMappedViewHandle.cs
- TextRange.cs
- SqlParameterizer.cs
- WindowsAuthenticationModule.cs
- StorageComplexPropertyMapping.cs
- Inflater.cs
- wgx_sdk_version.cs
- GroupDescription.cs
- XmlAttributeProperties.cs
- LinqDataSource.cs
- MultiBinding.cs
- DataGridViewControlCollection.cs
- SqlExpander.cs
- TransactionProtocolConverter.cs
- Clock.cs
- TextRunCacheImp.cs
- SoapInteropTypes.cs
- NotSupportedException.cs
- Stream.cs
- NetMsmqSecurity.cs
- TypefaceMap.cs
- TableDesigner.cs
- CanExecuteRoutedEventArgs.cs
- ConfigXmlSignificantWhitespace.cs
- DirectoryInfo.cs
- ServiceReference.cs
- CodeSubDirectoriesCollection.cs
- DataViewManager.cs
- Mapping.cs
- KnownTypes.cs
- SourceInterpreter.cs
- Funcletizer.cs
- IHttpResponseInternal.cs
- ProcessProtocolHandler.cs
- UserMapPath.cs
- WebScriptServiceHostFactory.cs
- HttpWebRequest.cs
- Size.cs
- TextRangeProviderWrapper.cs
- InternalCache.cs
- BuildTopDownAttribute.cs
- LabelInfo.cs
- _NegoStream.cs
- StringReader.cs
- ProcessModuleDesigner.cs
- SizeLimitedCache.cs
- GenericIdentity.cs
- HtmlInputText.cs
- CacheDependency.cs
- DeflateStream.cs
- Application.cs
- EditorResources.cs
- CompletionBookmark.cs
- HttpPostedFileBase.cs
- XPathDocument.cs
- LineSegment.cs
- MSAAWinEventWrap.cs
- ObjectHandle.cs
- ObjectSerializerFactory.cs
- SequentialUshortCollection.cs
- SiteMap.cs
- TemplateEditingVerb.cs
- PackUriHelper.cs
- Expr.cs
- DynamicDataExtensions.cs
- WebServiceMethodData.cs
- BuildProvider.cs
- DeviceSpecificChoice.cs
- SourceLocationProvider.cs
- HwndKeyboardInputProvider.cs
- MethodImplAttribute.cs
- MessageQueuePermissionAttribute.cs
- figurelengthconverter.cs
- Pkcs9Attribute.cs
- RightsManagementResourceHelper.cs
- DateTimeParse.cs
- PointLightBase.cs
- ChineseLunisolarCalendar.cs
- VisualTreeHelper.cs
- XmlSchemaProviderAttribute.cs
- ILGen.cs
- DetailsViewPagerRow.cs
- SoapSchemaMember.cs
- HijriCalendar.cs
- RelationshipConverter.cs