Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpCapabilitiesSectionHandler.cs
- _ShellExpression.cs
- PrintControllerWithStatusDialog.cs
- ApplicationTrust.cs
- DesignTimeTemplateParser.cs
- CodeObjectCreateExpression.cs
- HttpPostedFile.cs
- SetStoryboardSpeedRatio.cs
- SafeBitVector32.cs
- TextDocumentView.cs
- DbDeleteCommandTree.cs
- MasterPage.cs
- DataMisalignedException.cs
- BooleanExpr.cs
- XmlSchemaProviderAttribute.cs
- FrameworkPropertyMetadata.cs
- XPathAncestorQuery.cs
- Converter.cs
- EntityDataSourceEntitySetNameItem.cs
- HtmlInputFile.cs
- TextBox.cs
- EntityDataSourceDesigner.cs
- QilNode.cs
- TextElementEnumerator.cs
- SynchronizedPool.cs
- PathStreamGeometryContext.cs
- VariantWrapper.cs
- EdmProperty.cs
- ArrayElementGridEntry.cs
- UIPermission.cs
- InkCanvasSelectionAdorner.cs
- NumberFunctions.cs
- CompilationSection.cs
- TextSelectionHighlightLayer.cs
- Imaging.cs
- HttpListenerResponse.cs
- MSAAEventDispatcher.cs
- DataKey.cs
- VectorValueSerializer.cs
- UIPermission.cs
- RbTree.cs
- Control.cs
- Stackframe.cs
- BrowserCapabilitiesCodeGenerator.cs
- RegisteredScript.cs
- KnownColorTable.cs
- TableAdapterManagerNameHandler.cs
- CellPartitioner.cs
- BitmapMetadata.cs
- CellNormalizer.cs
- CompleteWizardStep.cs
- SynchronizedKeyedCollection.cs
- Inline.cs
- WindowsProgressbar.cs
- TextEditorTables.cs
- DataGridCellsPanel.cs
- EncodingTable.cs
- HebrewCalendar.cs
- ClientRuntimeConfig.cs
- Shared.cs
- EnumUnknown.cs
- ProxyAttribute.cs
- OptimizedTemplateContent.cs
- MouseButton.cs
- ContextMenuAutomationPeer.cs
- AsymmetricKeyExchangeFormatter.cs
- TableLayoutSettingsTypeConverter.cs
- Configuration.cs
- HealthMonitoringSection.cs
- UnmanagedMarshal.cs
- TextProviderWrapper.cs
- EventListenerClientSide.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- WindowsSecurityToken.cs
- DropSource.cs
- ListBoxChrome.cs
- CodeParameterDeclarationExpressionCollection.cs
- LoginView.cs
- SizeIndependentAnimationStorage.cs
- util.cs
- Trigger.cs
- EntityDataSourceValidationException.cs
- FormsIdentity.cs
- HyperLink.cs
- XmlSchemaProviderAttribute.cs
- DetailsView.cs
- RemotingHelper.cs
- basevalidator.cs
- OletxTransactionManager.cs
- ContentType.cs
- MouseEventArgs.cs
- DesignerAttribute.cs
- ButtonRenderer.cs
- HttpConfigurationContext.cs
- MappingMetadataHelper.cs
- ApplicationManager.cs
- XmlSignificantWhitespace.cs
- TreeViewItemAutomationPeer.cs
- figurelength.cs
- MergeExecutor.cs