Code:
/ DotNET / DotNET / 8.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
- StringCollection.cs
- DynamicResourceExtensionConverter.cs
- ModelPropertyDescriptor.cs
- XmlHelper.cs
- HttpApplicationFactory.cs
- ReaderWriterLock.cs
- SchemaNotation.cs
- UpdatableWrapper.cs
- BamlStream.cs
- DefaultValueTypeConverter.cs
- ApplicationHost.cs
- XmlSortKeyAccumulator.cs
- ExtenderControl.cs
- RootBrowserWindow.cs
- ConstraintStruct.cs
- ILGenerator.cs
- UserNamePasswordValidator.cs
- TextDecorations.cs
- Pool.cs
- UnsafeNativeMethods.cs
- Int64KeyFrameCollection.cs
- FloaterBaseParagraph.cs
- StringExpressionSet.cs
- AssemblyCacheEntry.cs
- _Connection.cs
- HostingEnvironment.cs
- PageThemeParser.cs
- AdPostCacheSubstitution.cs
- ISSmlParser.cs
- LeftCellWrapper.cs
- WinFormsUtils.cs
- BlockCollection.cs
- HwndHostAutomationPeer.cs
- RC2CryptoServiceProvider.cs
- GenericAuthenticationEventArgs.cs
- HitTestWithGeometryDrawingContextWalker.cs
- TrustLevel.cs
- SqlExpressionNullability.cs
- MatrixAnimationBase.cs
- MdImport.cs
- LineUtil.cs
- ListControl.cs
- FontWeightConverter.cs
- SchemaElement.cs
- DataGridViewDataErrorEventArgs.cs
- StagingAreaInputItem.cs
- GeometryModel3D.cs
- NetStream.cs
- ProgressiveCrcCalculatingStream.cs
- PreloadedPackages.cs
- DbConnectionFactory.cs
- PackWebRequest.cs
- PersonalizationStateInfoCollection.cs
- KeysConverter.cs
- CustomAttributeBuilder.cs
- IProvider.cs
- SoapSchemaMember.cs
- MethodToken.cs
- Debugger.cs
- ResourcePart.cs
- ToolZoneDesigner.cs
- KeyedHashAlgorithm.cs
- DecimalKeyFrameCollection.cs
- DesignerUtils.cs
- Vector.cs
- ExceptionUtil.cs
- PropertyDescriptorCollection.cs
- ImageDrawing.cs
- AccessDataSourceView.cs
- EncodingInfo.cs
- Component.cs
- GrammarBuilder.cs
- AutomationEventArgs.cs
- TransformConverter.cs
- UserPreferenceChangedEventArgs.cs
- WindowsTooltip.cs
- TemplateKey.cs
- MasterPageParser.cs
- ellipse.cs
- Stylesheet.cs
- FigureHelper.cs
- WinFormsUtils.cs
- HelpKeywordAttribute.cs
- DataServicePagingProviderWrapper.cs
- VirtualizingPanel.cs
- CharacterHit.cs
- TemplatedWizardStep.cs
- DefaultAssemblyResolver.cs
- SubqueryRules.cs
- dataprotectionpermissionattribute.cs
- TypeExtensionSerializer.cs
- RuleConditionDialog.cs
- ConnectorDragDropGlyph.cs
- GregorianCalendar.cs
- HealthMonitoringSectionHelper.cs
- ColorContext.cs
- TextRangeEditTables.cs
- PackagingUtilities.cs
- DeclarativeExpressionConditionDeclaration.cs
- NameValuePair.cs