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
- AssociatedControlConverter.cs
- ScalarType.cs
- PlanCompiler.cs
- IndependentAnimationStorage.cs
- NavigationEventArgs.cs
- StyleCollection.cs
- EmissiveMaterial.cs
- TextBounds.cs
- RegisteredScript.cs
- XPathDocumentNavigator.cs
- MobileTemplatedControlDesigner.cs
- ScriptReferenceEventArgs.cs
- DiffuseMaterial.cs
- IWorkflowDebuggerService.cs
- SqlDataSourceView.cs
- CodeArrayIndexerExpression.cs
- GridProviderWrapper.cs
- ComponentCollection.cs
- InvocationExpression.cs
- LogicalExpr.cs
- WebBaseEventKeyComparer.cs
- ObjectRef.cs
- PointHitTestParameters.cs
- BitmapEffectDrawingContextWalker.cs
- JoinCqlBlock.cs
- RuleSetDialog.cs
- CharacterBuffer.cs
- SinglePageViewer.cs
- XmlEncoding.cs
- AnnotationResource.cs
- StringUtil.cs
- TabControlDesigner.cs
- TemplateField.cs
- ClientSettingsSection.cs
- ExceptionUtil.cs
- ListViewUpdatedEventArgs.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- ContractNamespaceAttribute.cs
- HttpCachePolicyWrapper.cs
- ListCollectionView.cs
- DecoderExceptionFallback.cs
- SqlGenericUtil.cs
- XmlComment.cs
- ToolStripContainer.cs
- SetterBase.cs
- InputProviderSite.cs
- CharEnumerator.cs
- IntermediatePolicyValidator.cs
- X509CertificateValidationMode.cs
- Menu.cs
- XmlTextEncoder.cs
- MatrixValueSerializer.cs
- HwndTarget.cs
- CalendarTable.cs
- EndpointAddressMessageFilter.cs
- ViewManager.cs
- DataGridViewCheckBoxColumn.cs
- XmlSchemaRedefine.cs
- EmptyEnumerable.cs
- DataKey.cs
- WizardSideBarListControlItem.cs
- XmlSchemaParticle.cs
- Journal.cs
- SqlCharStream.cs
- SynchronizedDispatch.cs
- ApplyTemplatesAction.cs
- CodeTryCatchFinallyStatement.cs
- DataMisalignedException.cs
- ContentFilePart.cs
- MsmqVerifier.cs
- WaitHandleCannotBeOpenedException.cs
- StaticDataManager.cs
- WebPartActionVerb.cs
- SiteMapHierarchicalDataSourceView.cs
- _SingleItemRequestCache.cs
- SessionState.cs
- OutputCacheProfileCollection.cs
- TemplatedAdorner.cs
- XmlSchemaParticle.cs
- UserControl.cs
- RegexCompilationInfo.cs
- AdornerLayer.cs
- CaseInsensitiveOrdinalStringComparer.cs
- AccessText.cs
- ArrayWithOffset.cs
- Tuple.cs
- HtmlEncodedRawTextWriter.cs
- CodeAccessPermission.cs
- SmiSettersStream.cs
- SQLInt16Storage.cs
- DocumentPageView.cs
- FileUpload.cs
- MailAddressCollection.cs
- IndexerNameAttribute.cs
- IApplicationTrustManager.cs
- IDQuery.cs
- FunctionNode.cs
- ConfigXmlAttribute.cs
- MemberDomainMap.cs
- Size3D.cs