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
- SemaphoreSecurity.cs
- ScrollableControl.cs
- ObjectItemConventionAssemblyLoader.cs
- RadioButtonStandardAdapter.cs
- ResourceReferenceExpressionConverter.cs
- ToolStripItemTextRenderEventArgs.cs
- CreateUserWizardAutoFormat.cs
- StateMachineWorkflowInstance.cs
- StructuredTypeInfo.cs
- JsonReaderDelegator.cs
- SubMenuStyle.cs
- RealProxy.cs
- ConstantCheck.cs
- RsaSecurityToken.cs
- WindowsStreamSecurityBindingElement.cs
- AliasGenerator.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- XmlUtil.cs
- ReferenceConverter.cs
- EncodingDataItem.cs
- ContainerParagraph.cs
- HttpRuntime.cs
- CmsUtils.cs
- TrustManagerPromptUI.cs
- ModuleConfigurationInfo.cs
- AliasGenerator.cs
- Peer.cs
- Solver.cs
- RectangleGeometry.cs
- AnonymousIdentificationSection.cs
- EdmComplexPropertyAttribute.cs
- TdsParserStaticMethods.cs
- ChannelManagerHelpers.cs
- Lease.cs
- InvokeGenerator.cs
- Int64Converter.cs
- GetPageCompletedEventArgs.cs
- NumericPagerField.cs
- CatalogZone.cs
- SqlCommand.cs
- ProxySimple.cs
- ParseHttpDate.cs
- XmlSchemaDocumentation.cs
- FacetChecker.cs
- LocalValueEnumerator.cs
- SkipStoryboardToFill.cs
- PipeSecurity.cs
- FormParameter.cs
- EventDescriptorCollection.cs
- RepeaterItemEventArgs.cs
- PropertyValidationContext.cs
- MemoryStream.cs
- CqlWriter.cs
- HasCopySemanticsAttribute.cs
- SerializationFieldInfo.cs
- XmlNodeReader.cs
- Exception.cs
- PeerApplicationLaunchInfo.cs
- SqlVersion.cs
- ParserContext.cs
- HealthMonitoringSectionHelper.cs
- HttpServerUtilityWrapper.cs
- ClientProxyGenerator.cs
- HuffModule.cs
- IPGlobalProperties.cs
- BufferedGraphicsContext.cs
- EmissiveMaterial.cs
- ValidationErrorCollection.cs
- AmbiguousMatchException.cs
- PolicyLevel.cs
- ToolboxItemImageConverter.cs
- ListenerElementsCollection.cs
- WebPartConnectionsDisconnectVerb.cs
- AnnotationDocumentPaginator.cs
- DataGridViewCellLinkedList.cs
- MetabaseServerConfig.cs
- UnsafeNetInfoNativeMethods.cs
- NotifyParentPropertyAttribute.cs
- CompilerCollection.cs
- DataKey.cs
- HostedBindingBehavior.cs
- DecoderBestFitFallback.cs
- ReflectionServiceProvider.cs
- SharedStatics.cs
- coordinatorscratchpad.cs
- Normalization.cs
- login.cs
- IdentityManager.cs
- ValidateNames.cs
- ToolStripDropDownClosingEventArgs.cs
- AlignmentXValidation.cs
- OpenTypeCommon.cs
- HostedAspNetEnvironment.cs
- SystemBrushes.cs
- Padding.cs
- Axis.cs
- NetPeerTcpBindingElement.cs
- EventLogWatcher.cs
- AttachedProperty.cs
- InvalidPropValue.cs