Code:
/ FX-1434 / FX-1434 / 1.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
- EventProvider.cs
- WorkerRequest.cs
- ConfigViewGenerator.cs
- SerializationObjectManager.cs
- TextTreeTextBlock.cs
- KeyBinding.cs
- DesignerActionService.cs
- SemanticTag.cs
- QuaternionAnimation.cs
- IDispatchConstantAttribute.cs
- Path.cs
- webclient.cs
- SchemaMapping.cs
- DotExpr.cs
- ellipse.cs
- IsolationInterop.cs
- BinaryMessageFormatter.cs
- DataGridColumn.cs
- UnionExpr.cs
- COM2IProvidePropertyBuilderHandler.cs
- ResponseStream.cs
- TreeNodeStyle.cs
- PropertyRef.cs
- ShutDownListener.cs
- RectangleGeometry.cs
- ValueTable.cs
- ConsoleKeyInfo.cs
- GridViewRow.cs
- DelimitedListTraceListener.cs
- Propagator.cs
- DataTableMappingCollection.cs
- RectConverter.cs
- LinkAreaEditor.cs
- SafeNativeMethods.cs
- Column.cs
- CubicEase.cs
- Gdiplus.cs
- ProvidePropertyAttribute.cs
- ButtonAutomationPeer.cs
- ResolveNameEventArgs.cs
- FormsAuthenticationModule.cs
- COMException.cs
- ImageList.cs
- Constants.cs
- MatrixStack.cs
- ScriptingWebServicesSectionGroup.cs
- SynchronizedCollection.cs
- DesignObjectWrapper.cs
- DialogResultConverter.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- CriticalFinalizerObject.cs
- RadialGradientBrush.cs
- BinaryParser.cs
- PluralizationService.cs
- Visual3D.cs
- StatusStrip.cs
- Utils.cs
- TemplateBaseAction.cs
- WriteFileContext.cs
- AsymmetricSecurityBindingElement.cs
- Byte.cs
- WebPartConnection.cs
- EvidenceTypeDescriptor.cs
- MouseActionValueSerializer.cs
- RTTypeWrapper.cs
- WriteTimeStream.cs
- SynchronizingStream.cs
- XmlnsCompatibleWithAttribute.cs
- TypefaceCollection.cs
- MachineKeyValidationConverter.cs
- FunctionUpdateCommand.cs
- SelectionProviderWrapper.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- ListenerElementsCollection.cs
- cookiecollection.cs
- CopyAction.cs
- TransferRequestHandler.cs
- DataContext.cs
- HitTestWithPointDrawingContextWalker.cs
- TimeStampChecker.cs
- ThemeableAttribute.cs
- hebrewshape.cs
- QueryContinueDragEventArgs.cs
- EnterpriseServicesHelper.cs
- DES.cs
- TouchesOverProperty.cs
- Adorner.cs
- EnumType.cs
- DbParameterCollection.cs
- DeploymentSection.cs
- DeviceSpecificChoice.cs
- SQLBinaryStorage.cs
- FixedTextBuilder.cs
- DropShadowBitmapEffect.cs
- VirtualPathUtility.cs
- DataRecordInternal.cs
- SqlIdentifier.cs
- SchemaImporter.cs
- ForwardPositionQuery.cs
- ScriptingSectionGroup.cs