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
- WorkflowInstanceExtensionCollection.cs
- CommandField.cs
- CompilerInfo.cs
- CapabilitiesRule.cs
- DataGridHeaderBorder.cs
- xdrvalidator.cs
- BaseCodePageEncoding.cs
- EdmItemCollection.cs
- SharedPersonalizationStateInfo.cs
- SqlFunctionAttribute.cs
- XmlLoader.cs
- NavigationExpr.cs
- SqlBulkCopyColumnMappingCollection.cs
- FormsAuthenticationTicket.cs
- HostingPreferredMapPath.cs
- ResXDataNode.cs
- securitymgrsite.cs
- WebBrowserSiteBase.cs
- AsymmetricKeyExchangeFormatter.cs
- GuidelineSet.cs
- MethodRental.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- AttributeCollection.cs
- StringDictionaryEditor.cs
- TreeView.cs
- XmlText.cs
- XamlFilter.cs
- OleServicesContext.cs
- JpegBitmapEncoder.cs
- Calendar.cs
- StyleSheet.cs
- XmlLoader.cs
- _PooledStream.cs
- StringFormat.cs
- ContentFilePart.cs
- XmlILCommand.cs
- SafeHandle.cs
- DataGridViewCellValueEventArgs.cs
- OpenFileDialog.cs
- CodeDelegateCreateExpression.cs
- XDeferredAxisSource.cs
- SoapExtensionImporter.cs
- LinearGradientBrush.cs
- RepeaterItem.cs
- AxHostDesigner.cs
- TaiwanCalendar.cs
- RepeaterItemEventArgs.cs
- HostedTransportConfigurationBase.cs
- BinaryObjectReader.cs
- TableCell.cs
- OrthographicCamera.cs
- AdornerHitTestResult.cs
- tooltip.cs
- ToolStripSystemRenderer.cs
- StringArrayConverter.cs
- CodeDOMUtility.cs
- Image.cs
- ToolStripButton.cs
- XmlSchemaSimpleTypeUnion.cs
- SqlConnectionStringBuilder.cs
- WebBrowserBase.cs
- CommandID.cs
- HttpValueCollection.cs
- _FtpDataStream.cs
- SettingsBase.cs
- RankException.cs
- RegexMatch.cs
- CircleHotSpot.cs
- WindowsListView.cs
- DataContractSet.cs
- DoubleAnimation.cs
- TextBoxView.cs
- DynamicHyperLink.cs
- CompositeTypefaceMetrics.cs
- SimpleBitVector32.cs
- ButtonBaseAdapter.cs
- XmlSchema.cs
- BrowserCapabilitiesFactory.cs
- DeclaredTypeElementCollection.cs
- IDQuery.cs
- SBCSCodePageEncoding.cs
- EFTableProvider.cs
- Cursor.cs
- COAUTHIDENTITY.cs
- AudioFileOut.cs
- SqlProfileProvider.cs
- DateTimeConstantAttribute.cs
- SimpleWebHandlerParser.cs
- ProcessStartInfo.cs
- SafeSecurityHelper.cs
- BreadCrumbTextConverter.cs
- TCPClient.cs
- SessionSwitchEventArgs.cs
- SqlLiftIndependentRowExpressions.cs
- Command.cs
- CodeDomLocalizationProvider.cs
- DocumentStatusResources.cs
- Bold.cs
- Transactions.cs
- TripleDESCryptoServiceProvider.cs