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
- DiffuseMaterial.cs
- XmlAnyElementAttributes.cs
- TemplatedAdorner.cs
- ControlDesignerState.cs
- DataServicePagingProviderWrapper.cs
- Crc32Helper.cs
- IpcClientChannel.cs
- HttpGetProtocolImporter.cs
- AnnotationResourceCollection.cs
- SimpleExpression.cs
- TrailingSpaceComparer.cs
- RegexCharClass.cs
- BufferBuilder.cs
- SafePEFileHandle.cs
- HttpModuleCollection.cs
- odbcmetadatacollectionnames.cs
- AssemblyHash.cs
- VisualStyleInformation.cs
- ModifierKeysValueSerializer.cs
- DesignerCategoryAttribute.cs
- PtsContext.cs
- EdmToObjectNamespaceMap.cs
- GridViewRowPresenter.cs
- JournalNavigationScope.cs
- ThemeDirectoryCompiler.cs
- ChangeToolStripParentVerb.cs
- Keywords.cs
- EditorAttribute.cs
- StylusCaptureWithinProperty.cs
- InplaceBitmapMetadataWriter.cs
- BuilderPropertyEntry.cs
- DefaultBindingPropertyAttribute.cs
- SqlBuffer.cs
- HtmlInputFile.cs
- ValueTable.cs
- GridToolTip.cs
- ViewStateChangedEventArgs.cs
- UpdateCompiler.cs
- GridViewEditEventArgs.cs
- InertiaExpansionBehavior.cs
- ImmutableObjectAttribute.cs
- DoubleLink.cs
- DesignerListAdapter.cs
- HtmlButton.cs
- ToolboxItem.cs
- ObjectDataSourceEventArgs.cs
- ToolStripPanelRenderEventArgs.cs
- CompilerGlobalScopeAttribute.cs
- TransferMode.cs
- ObjectManager.cs
- ContextMenuService.cs
- XmlUTF8TextWriter.cs
- TypeToArgumentTypeConverter.cs
- CompilationUtil.cs
- DataGridViewCellStateChangedEventArgs.cs
- FacetEnabledSchemaElement.cs
- StrongNameMembershipCondition.cs
- CodeCompiler.cs
- QuestionEventArgs.cs
- XpsImage.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- ValueConversionAttribute.cs
- CTreeGenerator.cs
- ThrowHelper.cs
- TextBoxLine.cs
- SiteMapPath.cs
- MSG.cs
- Win32.cs
- PolygonHotSpot.cs
- remotingproxy.cs
- CodeGeneratorAttribute.cs
- DataObject.cs
- MergePropertyDescriptor.cs
- Timeline.cs
- PageThemeParser.cs
- ObjectQuery_EntitySqlExtensions.cs
- HtmlTableRow.cs
- TriState.cs
- SmtpSection.cs
- HttpDictionary.cs
- MemoryFailPoint.cs
- WebEventTraceProvider.cs
- GroupItem.cs
- Simplifier.cs
- Base64Stream.cs
- ConvertersCollection.cs
- ModelItemCollectionImpl.cs
- TabItemAutomationPeer.cs
- PathData.cs
- XPathSingletonIterator.cs
- UInt32Storage.cs
- FontInfo.cs
- ProfileGroupSettings.cs
- WebResourceUtil.cs
- DependencyObject.cs
- HostExecutionContextManager.cs
- PropertyMetadata.cs
- ConfigPathUtility.cs
- ButtonBaseDesigner.cs
- PreservationFileWriter.cs