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
- DynamicRenderer.cs
- PreviewKeyDownEventArgs.cs
- ConfigurationManagerHelperFactory.cs
- ResourceAttributes.cs
- TypeUtils.cs
- ConfigXmlDocument.cs
- Bidi.cs
- LateBoundBitmapDecoder.cs
- ResourcesBuildProvider.cs
- SystemParameters.cs
- MetaTableHelper.cs
- UriTemplateDispatchFormatter.cs
- GetLastErrorDetailsRequest.cs
- RequestCacheValidator.cs
- ObjectAnimationBase.cs
- DependencyProperty.cs
- AsymmetricSignatureFormatter.cs
- WebSysDescriptionAttribute.cs
- TextDecorationCollectionConverter.cs
- IntSecurity.cs
- MenuCommand.cs
- HandleCollector.cs
- FilterableAttribute.cs
- Timer.cs
- TextWriter.cs
- FormsAuthenticationEventArgs.cs
- Matrix3DConverter.cs
- ParserContext.cs
- FieldNameLookup.cs
- PartialTrustVisibleAssembly.cs
- ScriptResourceHandler.cs
- BindMarkupExtensionSerializer.cs
- BuildManager.cs
- ActivityTrace.cs
- DataGridViewComboBoxEditingControl.cs
- ConfigurationManagerHelper.cs
- SmtpMail.cs
- Privilege.cs
- SessionViewState.cs
- XmlSchemaSet.cs
- CommentGlyph.cs
- CollectionsUtil.cs
- WindowProviderWrapper.cs
- WebPartZone.cs
- RewritingPass.cs
- ClientConfigurationHost.cs
- ModelFunctionTypeElement.cs
- MessageRpc.cs
- AspCompat.cs
- ActivityCodeDomReferenceService.cs
- Semaphore.cs
- AttachInfo.cs
- PlanCompiler.cs
- XhtmlBasicPanelAdapter.cs
- WebEventCodes.cs
- XmlSerializerNamespaces.cs
- ADMembershipProvider.cs
- ListViewItem.cs
- EastAsianLunisolarCalendar.cs
- KnownBoxes.cs
- CommentEmitter.cs
- SelectionRangeConverter.cs
- PersistenceTypeAttribute.cs
- storepermissionattribute.cs
- SqlReferenceCollection.cs
- GlyphRun.cs
- UpdateCommand.cs
- TdsParserStaticMethods.cs
- EpmCustomContentDeSerializer.cs
- AppliedDeviceFiltersDialog.cs
- StylusPointPropertyUnit.cs
- Root.cs
- ActivitySurrogate.cs
- TransformCryptoHandle.cs
- RectAnimationBase.cs
- BrowserCapabilitiesFactory.cs
- SafeThreadHandle.cs
- PageHandlerFactory.cs
- ServiceReference.cs
- CodeSubDirectory.cs
- CharacterShapingProperties.cs
- QueryConverter.cs
- TemplateNameScope.cs
- Operand.cs
- dataobject.cs
- MulticastNotSupportedException.cs
- StrokeCollection2.cs
- XamlNamespaceHelper.cs
- MetafileEditor.cs
- HostUtils.cs
- UnsafeNativeMethodsTablet.cs
- CryptoKeySecurity.cs
- ContextMenuAutomationPeer.cs
- UriSection.cs
- ellipse.cs
- Debug.cs
- DateTimeFormatInfo.cs
- ImageDrawing.cs
- XmlDataSource.cs
- Menu.cs