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
- validationstate.cs
- QilPatternVisitor.cs
- Setter.cs
- KoreanCalendar.cs
- XmlAttributeCollection.cs
- ResourceWriter.cs
- XmlCustomFormatter.cs
- DirectoryGroupQuery.cs
- WindowsGraphics.cs
- ConfigPathUtility.cs
- VolatileResourceManager.cs
- PrintEvent.cs
- CoTaskMemHandle.cs
- TypeConverter.cs
- ToolStripStatusLabel.cs
- MetadataCache.cs
- SiteMapNodeItemEventArgs.cs
- NameSpaceExtractor.cs
- SqlBuilder.cs
- XmlSchemaNotation.cs
- LinearGradientBrush.cs
- WebPartConnectionsCancelVerb.cs
- TextTreeRootTextBlock.cs
- CodeAttributeDeclarationCollection.cs
- AnimationException.cs
- BuildResult.cs
- WindowsSolidBrush.cs
- RequestQueue.cs
- BrushValueSerializer.cs
- TaskFileService.cs
- AuthenticationModuleElement.cs
- EventLogEntryCollection.cs
- ErrorHandler.cs
- UserPreferenceChangedEventArgs.cs
- XPathEmptyIterator.cs
- DateTimeUtil.cs
- InputMethod.cs
- DbCommandDefinition.cs
- HttpApplicationFactory.cs
- RotationValidation.cs
- TagNameToTypeMapper.cs
- TextLineResult.cs
- _BufferOffsetSize.cs
- CellParagraph.cs
- ThreadLocal.cs
- TdsParserHelperClasses.cs
- ConfigurationSettings.cs
- GAC.cs
- InvalidOleVariantTypeException.cs
- SafeWaitHandle.cs
- RegexTree.cs
- PerformanceCountersBase.cs
- smtpconnection.cs
- SystemDropShadowChrome.cs
- BindingExpressionBase.cs
- ConfigurationManagerHelper.cs
- SecurityManager.cs
- ButtonBase.cs
- SafeEventLogWriteHandle.cs
- Pts.cs
- InvalidEnumArgumentException.cs
- Triplet.cs
- CodeAttributeArgumentCollection.cs
- ColumnWidthChangedEvent.cs
- ObjectToken.cs
- WebCategoryAttribute.cs
- InstanceData.cs
- Helpers.cs
- QualifiedCellIdBoolean.cs
- Expression.cs
- PlainXmlSerializer.cs
- LinkDescriptor.cs
- ProvidersHelper.cs
- QueryExecutionOption.cs
- CurrentChangingEventArgs.cs
- AppSecurityManager.cs
- InvokeSchedule.cs
- ArrayHelper.cs
- Button.cs
- Win32Native.cs
- HttpAsyncResult.cs
- UpdateProgress.cs
- UpdateProgress.cs
- updatecommandorderer.cs
- HttpApplicationFactory.cs
- StackBuilderSink.cs
- MenuItemStyle.cs
- StylusCollection.cs
- AppDomainResourcePerfCounters.cs
- PathFigureCollection.cs
- PaintValueEventArgs.cs
- XamlDesignerSerializationManager.cs
- PathFigureCollectionConverter.cs
- EncryptedData.cs
- ContentPlaceHolderDesigner.cs
- Expressions.cs
- ObservableCollectionDefaultValueFactory.cs
- SliderAutomationPeer.cs
- ProtocolsConfigurationHandler.cs
- SchemaImporterExtension.cs