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
- SecurityDocument.cs
- SafeNativeMethodsOther.cs
- CroppedBitmap.cs
- RegisteredScript.cs
- ToolStripContentPanelDesigner.cs
- NameValueSectionHandler.cs
- RectAnimationBase.cs
- ChannelDispatcher.cs
- UnSafeCharBuffer.cs
- SweepDirectionValidation.cs
- NativeObjectSecurity.cs
- RoutedEventArgs.cs
- BinaryExpression.cs
- ShaderEffect.cs
- HttpProfileBase.cs
- Table.cs
- SweepDirectionValidation.cs
- Profiler.cs
- Point.cs
- SelectionItemPattern.cs
- EncoderNLS.cs
- HtmlHistory.cs
- StringResourceManager.cs
- IxmlLineInfo.cs
- CommandExpr.cs
- ButtonStandardAdapter.cs
- FileUtil.cs
- ProtocolInformationReader.cs
- WebServiceMethodData.cs
- DataRelation.cs
- TcpTransportElement.cs
- CorrelationManager.cs
- TableLayoutSettings.cs
- CultureSpecificCharacterBufferRange.cs
- Registry.cs
- RegexNode.cs
- AlternateView.cs
- CodeSubDirectory.cs
- AssemblyNameProxy.cs
- RelationshipWrapper.cs
- InstanceLockTracking.cs
- RowsCopiedEventArgs.cs
- PnrpPermission.cs
- BuildProvider.cs
- OleDbConnectionFactory.cs
- IdlingCommunicationPool.cs
- CheckBoxField.cs
- UpdatePanelTrigger.cs
- StyleHelper.cs
- FormsAuthenticationTicket.cs
- CodeComment.cs
- ExtenderProvidedPropertyAttribute.cs
- basemetadatamappingvisitor.cs
- ExpressionBuilder.cs
- WinInetCache.cs
- BuiltInExpr.cs
- DependencyStoreSurrogate.cs
- hwndwrapper.cs
- ScriptingSectionGroup.cs
- DocumentPageHost.cs
- QuaternionConverter.cs
- TemplateAction.cs
- CodeDelegateCreateExpression.cs
- TargetConverter.cs
- FormatConvertedBitmap.cs
- RawMouseInputReport.cs
- ThreadInterruptedException.cs
- DesignTableCollection.cs
- LinkedResource.cs
- MetadataConversionError.cs
- propertytag.cs
- QuotedStringWriteStateInfo.cs
- DesignTimeSiteMapProvider.cs
- DataServiceHost.cs
- TimeEnumHelper.cs
- SchemaCollectionCompiler.cs
- BeginCreateSecurityTokenRequest.cs
- GridViewRow.cs
- LinqDataSourceContextEventArgs.cs
- Floater.cs
- DialogDivider.cs
- EditorPart.cs
- WmlImageAdapter.cs
- ValueExpressions.cs
- VirtualizedItemPattern.cs
- ToolboxBitmapAttribute.cs
- TemplateXamlTreeBuilder.cs
- HttpCachePolicy.cs
- TaiwanLunisolarCalendar.cs
- PngBitmapDecoder.cs
- FileDataSourceCache.cs
- CodeGenerator.cs
- RadioButtonFlatAdapter.cs
- Math.cs
- RevocationPoint.cs
- CompositeScriptReferenceEventArgs.cs
- SafeBitVector32.cs
- ReachSerializer.cs
- ConnectionPoolManager.cs
- WindowsAuthenticationModule.cs