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
- WindowsListViewItem.cs
- PanelDesigner.cs
- SynchronizationLockException.cs
- XmlEncoding.cs
- SerialStream.cs
- GcSettings.cs
- EventProviderWriter.cs
- MsdtcWrapper.cs
- WebConvert.cs
- TraceProvider.cs
- Rfc4050KeyFormatter.cs
- MoveSizeWinEventHandler.cs
- ReflectTypeDescriptionProvider.cs
- Guid.cs
- WinEventTracker.cs
- ExeContext.cs
- CopyOfAction.cs
- InfoCardConstants.cs
- ConfigurationLoaderException.cs
- ToolboxItem.cs
- ContainerVisual.cs
- StreamSecurityUpgradeAcceptorBase.cs
- QilLoop.cs
- BitmapVisualManager.cs
- AttributeUsageAttribute.cs
- _WinHttpWebProxyDataBuilder.cs
- SwitchLevelAttribute.cs
- ReachPageContentCollectionSerializerAsync.cs
- HwndHost.cs
- EtwTrace.cs
- FontUnitConverter.cs
- DeferredRunTextReference.cs
- ValuePattern.cs
- storepermissionattribute.cs
- Debug.cs
- ImageClickEventArgs.cs
- SmiMetaDataProperty.cs
- RawUIStateInputReport.cs
- FixedSOMTextRun.cs
- LoadedOrUnloadedOperation.cs
- InkCanvasInnerCanvas.cs
- ResumeStoryboard.cs
- DbConnectionPool.cs
- SystemDiagnosticsSection.cs
- StaticFileHandler.cs
- WebResourceAttribute.cs
- TableCellCollection.cs
- Graph.cs
- WindowsStatic.cs
- MailSettingsSection.cs
- Property.cs
- __ConsoleStream.cs
- ResourceAttributes.cs
- AmbientProperties.cs
- SoapParser.cs
- FlowDocumentPageViewerAutomationPeer.cs
- JsonSerializer.cs
- SqlConnectionString.cs
- WindowsHyperlink.cs
- HashFinalRequest.cs
- ListViewTableCell.cs
- ControlCollection.cs
- SpecularMaterial.cs
- RoutedCommand.cs
- FacetValueContainer.cs
- ConfigurationCollectionAttribute.cs
- EventHandlersStore.cs
- QuaternionRotation3D.cs
- ValidationErrorCollection.cs
- BitmapEditor.cs
- Camera.cs
- LocalizationComments.cs
- SqlCacheDependencyDatabase.cs
- WindowsListViewGroupHelper.cs
- HostedTransportConfigurationManager.cs
- MappingMetadataHelper.cs
- ObsoleteAttribute.cs
- AsymmetricKeyExchangeDeformatter.cs
- WebEvents.cs
- AdornerPresentationContext.cs
- DrawingContextDrawingContextWalker.cs
- BitmapScalingModeValidation.cs
- RegexCompilationInfo.cs
- WindowsGrip.cs
- DataGridViewRowConverter.cs
- RuntimeResourceSet.cs
- MiniConstructorInfo.cs
- TypeViewSchema.cs
- FaultDescriptionCollection.cs
- DelegateBodyWriter.cs
- XomlCompilerParameters.cs
- DataGridCell.cs
- SqlMethodAttribute.cs
- HyperlinkAutomationPeer.cs
- ServiceContractListItem.cs
- Int32CAMarshaler.cs
- ChannelManager.cs
- NativeMethods.cs
- SqlDataSourceView.cs
- XmlNodeComparer.cs