Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ListViewTableRow.cs
- UnsafeNativeMethods.cs
- WebPartConnectionsCloseVerb.cs
- InteropAutomationProvider.cs
- LocalIdKeyIdentifierClause.cs
- JournalEntryListConverter.cs
- PerformanceCounterPermission.cs
- HitTestParameters3D.cs
- HtmlControlPersistable.cs
- smtppermission.cs
- HwndSourceKeyboardInputSite.cs
- EventLogPermissionAttribute.cs
- ZipIOExtraFieldElement.cs
- BrowserCapabilitiesFactory.cs
- ReadWriteObjectLock.cs
- Inflater.cs
- FixedSOMElement.cs
- EntityRecordInfo.cs
- HttpServerUtilityBase.cs
- HttpApplicationStateBase.cs
- PlaceHolder.cs
- ConfigurationLocation.cs
- CodeAttributeArgumentCollection.cs
- StrokeDescriptor.cs
- IISMapPath.cs
- CheckBoxRenderer.cs
- StylusPointDescription.cs
- KeyEvent.cs
- DrawingBrush.cs
- CaretElement.cs
- NonBatchDirectoryCompiler.cs
- ProcessModelInfo.cs
- DirectionalLight.cs
- Attributes.cs
- LocalizationCodeDomSerializer.cs
- WithStatement.cs
- BufferedStream.cs
- InheritanceService.cs
- ImageIndexConverter.cs
- AdapterDictionary.cs
- MasterPageParser.cs
- Debug.cs
- HttpClientCertificate.cs
- ObjectView.cs
- _ProxyChain.cs
- wmiprovider.cs
- CodeIterationStatement.cs
- SelfSignedCertificate.cs
- PrintDialog.cs
- PixelShader.cs
- RadioButtonAutomationPeer.cs
- ScrollEvent.cs
- CommandDevice.cs
- SamlSecurityToken.cs
- SqlWebEventProvider.cs
- PipelineComponent.cs
- AliasedSlot.cs
- OverflowException.cs
- EncoderParameters.cs
- PageThemeCodeDomTreeGenerator.cs
- PersonalizableTypeEntry.cs
- ClientSettingsSection.cs
- PreviewPrintController.cs
- PaginationProgressEventArgs.cs
- LoadGrammarCompletedEventArgs.cs
- FillRuleValidation.cs
- TextWriterTraceListener.cs
- ToolStripTextBox.cs
- MergeFilterQuery.cs
- MetadataCache.cs
- Utilities.cs
- ManifestSignedXml.cs
- BitmapEffectOutputConnector.cs
- IteratorFilter.cs
- SingleAnimationBase.cs
- IncrementalHitTester.cs
- NavigationFailedEventArgs.cs
- StringUtil.cs
- XmlMtomReader.cs
- ConnectionsZone.cs
- TiffBitmapDecoder.cs
- EntityDataSourceDataSelection.cs
- PropertyConverter.cs
- StreamGeometryContext.cs
- KeyFrames.cs
- BitmapCodecInfoInternal.cs
- MachineKeyValidationConverter.cs
- PathFigure.cs
- InstanceDescriptor.cs
- DependencySource.cs
- ScriptingRoleServiceSection.cs
- UnsafeNativeMethods.cs
- KnownBoxes.cs
- IdentitySection.cs
- TrustLevelCollection.cs
- WindowsListViewItemCheckBox.cs
- ToolStripOverflowButton.cs
- LinkButton.cs
- DictionaryGlobals.cs
- ObjectDataSourceView.cs