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
- XmlTextReaderImplHelpers.cs
- OutputBuffer.cs
- DefaultPropertyAttribute.cs
- ProvidersHelper.cs
- WebMessageFormatHelper.cs
- EntityDataSourceUtil.cs
- MetricEntry.cs
- ClaimComparer.cs
- SafeRegistryHandle.cs
- Misc.cs
- OnOperation.cs
- HTTP_SERVICE_CONFIG_URLACL_PARAM.cs
- NegatedCellConstant.cs
- ECDiffieHellman.cs
- XmlTextReaderImpl.cs
- ConfigXmlCDataSection.cs
- LineUtil.cs
- IntegerFacetDescriptionElement.cs
- TextBoxBase.cs
- AssociationSetMetadata.cs
- TextTreeNode.cs
- FlowDocumentReader.cs
- Screen.cs
- HttpAsyncResult.cs
- NamespaceQuery.cs
- EventHandlingScope.cs
- RewritingProcessor.cs
- RawStylusActions.cs
- VersionValidator.cs
- UmAlQuraCalendar.cs
- SQLDateTime.cs
- SecurityValidationBehavior.cs
- wgx_sdk_version.cs
- SendSecurityHeader.cs
- PeerApplicationLaunchInfo.cs
- ClientTargetCollection.cs
- SortableBindingList.cs
- EventlogProvider.cs
- PartEditor.cs
- XamlToRtfParser.cs
- CodeTryCatchFinallyStatement.cs
- Timer.cs
- IsolatedStorageFile.cs
- LiteralLink.cs
- ACL.cs
- uribuilder.cs
- PatternMatcher.cs
- SkewTransform.cs
- FixedPageStructure.cs
- ResourceSetExpression.cs
- MulticastNotSupportedException.cs
- XPathAncestorIterator.cs
- PtsHost.cs
- PolyLineSegment.cs
- EventLog.cs
- ScaleTransform3D.cs
- OlePropertyStructs.cs
- OleDbError.cs
- DeviceSpecificDialogCachedState.cs
- SendMailErrorEventArgs.cs
- LogExtent.cs
- TextAutomationPeer.cs
- ToolBarPanel.cs
- HotCommands.cs
- ListViewSortEventArgs.cs
- AnnotationMap.cs
- StylusPointProperty.cs
- XmlSchemaSimpleType.cs
- BinaryFormatter.cs
- CodeDelegateCreateExpression.cs
- SqlDataSourceParameterParser.cs
- BindingCollectionElement.cs
- OleDbDataReader.cs
- UnsafeNativeMethods.cs
- DefaultPrintController.cs
- HuffCodec.cs
- DataGridViewRowConverter.cs
- Timer.cs
- NamespaceEmitter.cs
- DataViewManagerListItemTypeDescriptor.cs
- GridViewCommandEventArgs.cs
- ExtentKey.cs
- XmlTextAttribute.cs
- StringResourceManager.cs
- RayMeshGeometry3DHitTestResult.cs
- TableLayoutStyleCollection.cs
- WizardStepBase.cs
- ImageResources.Designer.cs
- XmlSchemaComplexContentExtension.cs
- UnionCodeGroup.cs
- QuadTree.cs
- CacheVirtualItemsEvent.cs
- BrowserDefinitionCollection.cs
- UnauthorizedWebPart.cs
- LineVisual.cs
- QueryActivatableWorkflowsCommand.cs
- SqlXml.cs
- SQLSingleStorage.cs
- ComponentChangingEvent.cs
- OrderedEnumerableRowCollection.cs