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
- Crc32Helper.cs
- NumberFormatInfo.cs
- ExtendLockAsyncResult.cs
- MemberPath.cs
- InfoCardProofToken.cs
- FormsAuthenticationUserCollection.cs
- PenThreadPool.cs
- CanExecuteRoutedEventArgs.cs
- ProviderConnectionPoint.cs
- ControlValuePropertyAttribute.cs
- WindowsTitleBar.cs
- HttpPostedFileWrapper.cs
- FileNotFoundException.cs
- MethodExpr.cs
- FlowDocumentReaderAutomationPeer.cs
- Brushes.cs
- IisTraceWebEventProvider.cs
- AttachedProperty.cs
- WeakEventTable.cs
- EncodingInfo.cs
- GridViewUpdateEventArgs.cs
- TemplateAction.cs
- ActiveDocumentEvent.cs
- QueryStringConverter.cs
- FontUnit.cs
- diagnosticsswitches.cs
- MappedMetaModel.cs
- ListManagerBindingsCollection.cs
- DependencyPropertyAttribute.cs
- TypedColumnHandler.cs
- AdornerLayer.cs
- CopyOnWriteList.cs
- NameService.cs
- SerializationSectionGroup.cs
- AssemblyUtil.cs
- FrugalList.cs
- TemplateControl.cs
- ImageButton.cs
- MatrixTransform3D.cs
- CompositeKey.cs
- HtmlTableCellCollection.cs
- ReadOnlyAttribute.cs
- ManagedFilter.cs
- ContractReference.cs
- TextBoxRenderer.cs
- EntityDataSourceMemberPath.cs
- ExclusiveCanonicalizationTransform.cs
- Utility.cs
- Util.cs
- LightweightCodeGenerator.cs
- PostBackOptions.cs
- SoapServerProtocol.cs
- WebPartCancelEventArgs.cs
- NamedPermissionSet.cs
- BinaryKeyIdentifierClause.cs
- AvTrace.cs
- StrokeRenderer.cs
- CustomTrackingRecord.cs
- PasswordRecovery.cs
- Membership.cs
- LogFlushAsyncResult.cs
- RedBlackList.cs
- FormatterServices.cs
- XamlSerializer.cs
- BmpBitmapDecoder.cs
- BamlCollectionHolder.cs
- RoutedEventArgs.cs
- FontFamilyIdentifier.cs
- InputProcessorProfilesLoader.cs
- StreamGeometryContext.cs
- NodeLabelEditEvent.cs
- DecryptedHeader.cs
- SafeNativeMethodsCLR.cs
- StrokeNode.cs
- ObjectList.cs
- HostExecutionContextManager.cs
- DataGridTextBoxColumn.cs
- ParallelTimeline.cs
- CaseStatement.cs
- FormsAuthenticationUser.cs
- sitestring.cs
- RelationshipManager.cs
- XmlEnumAttribute.cs
- CheckBox.cs
- ToolStripContextMenu.cs
- PopupRoot.cs
- BasicCellRelation.cs
- WindowClosedEventArgs.cs
- IdentityModelDictionary.cs
- PlainXmlDeserializer.cs
- PropertyPathWorker.cs
- EndEvent.cs
- SecurityChannelListener.cs
- WebBaseEventKeyComparer.cs
- CompositeControl.cs
- InlinedAggregationOperatorEnumerator.cs
- HostedTransportConfigurationBase.cs
- ControlIdConverter.cs
- LazyTextWriterCreator.cs
- ImplicitInputBrush.cs