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
- AttributeCollection.cs
- MergeLocalizationDirectives.cs
- MappingItemCollection.cs
- HyperLinkStyle.cs
- DataGridRowEventArgs.cs
- XmlTextWriter.cs
- PackagePart.cs
- Pool.cs
- EntityDataSourceMemberPath.cs
- ConsumerConnectionPointCollection.cs
- ImageBrush.cs
- SequenceRange.cs
- IxmlLineInfo.cs
- OleServicesContext.cs
- XmlPreloadedResolver.cs
- TextElementAutomationPeer.cs
- PerformanceCountersElement.cs
- mediaeventargs.cs
- KnownBoxes.cs
- FileDialogPermission.cs
- DetailsViewDeletedEventArgs.cs
- PriorityChain.cs
- TableLayoutSettingsTypeConverter.cs
- ControlCollection.cs
- ConfigurationManagerInternalFactory.cs
- SchemaCreator.cs
- SerializationAttributes.cs
- Rights.cs
- SpecialNameAttribute.cs
- ConfigurationPropertyCollection.cs
- SqlTriggerAttribute.cs
- altserialization.cs
- _WebProxyDataBuilder.cs
- TextElementAutomationPeer.cs
- DeflateInput.cs
- MsmqIntegrationBindingElement.cs
- ParallelForEach.cs
- GPStream.cs
- SqlFactory.cs
- TextElementEnumerator.cs
- InternalPermissions.cs
- WebUtil.cs
- DrawTreeNodeEventArgs.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- TransactionManager.cs
- DataGridView.cs
- OpenTypeLayout.cs
- ShadowGlyph.cs
- RemoveStoryboard.cs
- EventPrivateKey.cs
- OutOfProcStateClientManager.cs
- ToolBar.cs
- ProcessHostMapPath.cs
- ValueOfAction.cs
- Storyboard.cs
- SafeNativeMethods.cs
- ValidationErrorInfo.cs
- PeerName.cs
- SimpleHandlerFactory.cs
- BulletedListEventArgs.cs
- SubMenuStyleCollection.cs
- WindowsUpDown.cs
- Error.cs
- ChineseLunisolarCalendar.cs
- safesecurityhelperavalon.cs
- OleDbDataReader.cs
- DeadCharTextComposition.cs
- RuntimeWrappedException.cs
- Privilege.cs
- WebResponse.cs
- XmlSchemaInclude.cs
- FontSource.cs
- SmtpLoginAuthenticationModule.cs
- ActivityLocationReferenceEnvironment.cs
- RawStylusSystemGestureInputReport.cs
- TypeForwardedToAttribute.cs
- Visual3D.cs
- XPathEmptyIterator.cs
- CurrentChangingEventManager.cs
- DLinqDataModelProvider.cs
- _Rfc2616CacheValidators.cs
- CompositeControl.cs
- Control.cs
- SQLByte.cs
- coordinator.cs
- StateMachineWorkflowInstance.cs
- ConnectionModeReader.cs
- XamlPointCollectionSerializer.cs
- TextBoxView.cs
- ProviderSettings.cs
- LabelEditEvent.cs
- FileSecurity.cs
- ForceCopyBuildProvider.cs
- StandardBindingReliableSessionElement.cs
- CollectionBuilder.cs
- GridViewRowPresenterBase.cs
- SelectionGlyph.cs
- EventEntry.cs
- DataGridViewImageCell.cs
- BCLDebug.cs