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
- NeutralResourcesLanguageAttribute.cs
- EmptyQuery.cs
- RawTextInputReport.cs
- ValuePattern.cs
- RemotingAttributes.cs
- StrongNameIdentityPermission.cs
- DynamicScriptObject.cs
- CriticalFinalizerObject.cs
- ReadContentAsBinaryHelper.cs
- SystemBrushes.cs
- PassportAuthenticationModule.cs
- ScriptControlManager.cs
- ExceptionAggregator.cs
- List.cs
- InertiaTranslationBehavior.cs
- ListSourceHelper.cs
- AutomationPropertyInfo.cs
- RetrieveVirtualItemEventArgs.cs
- EnumerableCollectionView.cs
- UInt64Storage.cs
- ContentType.cs
- SplitterCancelEvent.cs
- PolygonHotSpot.cs
- CheckBoxFlatAdapter.cs
- SortQueryOperator.cs
- CompilationLock.cs
- FilterQuery.cs
- X509CertificateCollection.cs
- ConfigurationLockCollection.cs
- DesignTimeValidationFeature.cs
- CodeRegionDirective.cs
- DataGridViewSelectedColumnCollection.cs
- WbmpConverter.cs
- SecondaryViewProvider.cs
- MessageParameterAttribute.cs
- BuildProvider.cs
- EastAsianLunisolarCalendar.cs
- WrapperEqualityComparer.cs
- StylusSystemGestureEventArgs.cs
- XPathDocument.cs
- DataGridViewCellFormattingEventArgs.cs
- StateBag.cs
- X509ChainPolicy.cs
- KeyEventArgs.cs
- DataGridColumnCollection.cs
- SizeAnimation.cs
- CustomAttribute.cs
- StaticResourceExtension.cs
- RepeatButtonAutomationPeer.cs
- ContravarianceAdapter.cs
- ArrayExtension.cs
- EnumUnknown.cs
- XsltLibrary.cs
- ChangesetResponse.cs
- PerformanceCounterNameAttribute.cs
- DynamicAttribute.cs
- StrongNameIdentityPermission.cs
- WindowsMenu.cs
- SettingsPropertyValueCollection.cs
- SafeWaitHandle.cs
- TypeViewSchema.cs
- OrderPreservingPipeliningSpoolingTask.cs
- OpenFileDialog.cs
- ImmutableAssemblyCacheEntry.cs
- SessionPageStateSection.cs
- GestureRecognizer.cs
- IntellisenseTextBox.cs
- Tool.cs
- SaveWorkflowAsyncResult.cs
- ProxyFragment.cs
- EntityWithChangeTrackerStrategy.cs
- AnnotationAdorner.cs
- TaskExtensions.cs
- JapaneseCalendar.cs
- EntityWrapper.cs
- TagMapCollection.cs
- IdlingCommunicationPool.cs
- Stroke2.cs
- ManualResetEvent.cs
- PathFigureCollection.cs
- SystemColorTracker.cs
- SimpleLine.cs
- EditorPartChrome.cs
- EntityDesignerUtils.cs
- RotateTransform.cs
- unitconverter.cs
- ComplexPropertyEntry.cs
- SqlUserDefinedAggregateAttribute.cs
- HttpValueCollection.cs
- BinaryObjectWriter.cs
- HintTextMaxWidthConverter.cs
- DefaultCommandExtensionCallback.cs
- QuotedPrintableStream.cs
- CheckBoxDesigner.cs
- ClientTargetCollection.cs
- clipboard.cs
- SHA512Cng.cs
- ServiceElementCollection.cs
- WebPartTransformerCollection.cs
- LinkButton.cs