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
- SizeValueSerializer.cs
- SecurityKeyIdentifierClause.cs
- HandlerFactoryCache.cs
- COMException.cs
- BoundPropertyEntry.cs
- CodeSubDirectoriesCollection.cs
- ImportOptions.cs
- DnsPermission.cs
- TypedDatasetGenerator.cs
- OleDbStruct.cs
- HttpApplicationFactory.cs
- SplitContainer.cs
- EllipseGeometry.cs
- ConvertEvent.cs
- PieceDirectory.cs
- AssemblyBuilder.cs
- NameHandler.cs
- BitmapEffectDrawingContextWalker.cs
- DataGridViewComboBoxColumnDesigner.cs
- RIPEMD160Managed.cs
- Rectangle.cs
- BinaryCommonClasses.cs
- SafeViewOfFileHandle.cs
- SendOperation.cs
- MissingFieldException.cs
- BoundField.cs
- DataServiceQueryProvider.cs
- BinaryFormatterWriter.cs
- StringFreezingAttribute.cs
- RowBinding.cs
- XmlILModule.cs
- VirtualPathUtility.cs
- AutoGeneratedField.cs
- CharacterBufferReference.cs
- ConfigXmlAttribute.cs
- ImageField.cs
- HtmlInputFile.cs
- Operand.cs
- HostUtils.cs
- PresentationTraceSources.cs
- SerialReceived.cs
- DeferredReference.cs
- WorkflowInstanceExtensionProvider.cs
- MaterializeFromAtom.cs
- SrgsElementFactoryCompiler.cs
- COM2ExtendedTypeConverter.cs
- RegexMatch.cs
- ClientUrlResolverWrapper.cs
- MasterPageParser.cs
- COSERVERINFO.cs
- DecimalConstantAttribute.cs
- WebPartConnectionsDisconnectVerb.cs
- DesignerVerb.cs
- EqualityComparer.cs
- PropertyFilterAttribute.cs
- FunctionNode.cs
- CodeThrowExceptionStatement.cs
- IntSecurity.cs
- ItemsPresenter.cs
- OleDbErrorCollection.cs
- IgnoreFileBuildProvider.cs
- ContentType.cs
- BrowserCapabilitiesCodeGenerator.cs
- RemoteWebConfigurationHostStream.cs
- WebBrowserSiteBase.cs
- SchemaNotation.cs
- ColorConverter.cs
- BindingManagerDataErrorEventArgs.cs
- _NegoState.cs
- SortKey.cs
- RtType.cs
- IxmlLineInfo.cs
- UnknownWrapper.cs
- ExtendedPropertyCollection.cs
- DispatcherHooks.cs
- Models.cs
- parserscommon.cs
- _AcceptOverlappedAsyncResult.cs
- FtpRequestCacheValidator.cs
- BasicBrowserDialog.designer.cs
- TypedAsyncResult.cs
- SiteMap.cs
- SoapSchemaExporter.cs
- DbConnectionClosed.cs
- SecureEnvironment.cs
- Stylesheet.cs
- SqlCommandSet.cs
- ArgIterator.cs
- oledbconnectionstring.cs
- DecimalAnimation.cs
- UnitySerializationHolder.cs
- FrameworkContextData.cs
- Header.cs
- StoreItemCollection.Loader.cs
- ButtonField.cs
- MDIClient.cs
- FrameworkElementFactoryMarkupObject.cs
- MultiTrigger.cs
- RenderCapability.cs
- DataControlButton.cs