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
- SoapConverter.cs
- ManagementQuery.cs
- SafeSecurityHandles.cs
- BitmapEffectDrawingContextWalker.cs
- ColorKeyFrameCollection.cs
- DelegatingConfigHost.cs
- ActivationArguments.cs
- InputProcessorProfiles.cs
- SingleResultAttribute.cs
- ObjectQuery.cs
- HttpContextServiceHost.cs
- RemotingException.cs
- EnumUnknown.cs
- DateTimeOffset.cs
- RoutedPropertyChangedEventArgs.cs
- AuthenticatingEventArgs.cs
- HMACMD5.cs
- ThaiBuddhistCalendar.cs
- BaseTemplatedMobileComponentEditor.cs
- XmlSchemaParticle.cs
- ScriptingProfileServiceSection.cs
- ChtmlImageAdapter.cs
- _ListenerAsyncResult.cs
- DataGrid.cs
- SmiContext.cs
- HtmlPhoneCallAdapter.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- DataContext.cs
- PropagatorResult.cs
- ViewLoader.cs
- StyleSelector.cs
- TemplateControlParser.cs
- IERequestCache.cs
- AsyncPostBackTrigger.cs
- UpdateTranslator.cs
- IntegrationExceptionEventArgs.cs
- FontStretches.cs
- mansign.cs
- DiscardableAttribute.cs
- SRef.cs
- SerializationAttributes.cs
- OutgoingWebRequestContext.cs
- OleDbCommand.cs
- StringFormat.cs
- MetadataCache.cs
- RemoteWebConfigurationHostStream.cs
- TypedReference.cs
- QueueSurrogate.cs
- AutoGeneratedField.cs
- DirectionalLight.cs
- TransactionManager.cs
- RestClientProxyHandler.cs
- ActivityDesigner.cs
- XamlFxTrace.cs
- UnsafeNativeMethods.cs
- WebUtil.cs
- ComPlusInstanceProvider.cs
- DWriteFactory.cs
- ConfigXmlAttribute.cs
- ExpressionNormalizer.cs
- GestureRecognizer.cs
- LeafCellTreeNode.cs
- MonitoringDescriptionAttribute.cs
- CurrencyWrapper.cs
- EllipseGeometry.cs
- URLMembershipCondition.cs
- RegexReplacement.cs
- SocketPermission.cs
- CompositeCollectionView.cs
- MenuAdapter.cs
- AccessDataSource.cs
- ObjectListItem.cs
- SignedPkcs7.cs
- DataMemberConverter.cs
- TcpAppDomainProtocolHandler.cs
- PrimitiveXmlSerializers.cs
- PropertyDescriptor.cs
- MsmqHostedTransportConfiguration.cs
- filewebrequest.cs
- ConfigXmlAttribute.cs
- ProfileService.cs
- FixedSOMTextRun.cs
- PartialCachingAttribute.cs
- MemberPath.cs
- IconBitmapDecoder.cs
- XmlSubtreeReader.cs
- XmlDocumentType.cs
- ScriptingSectionGroup.cs
- ModuleBuilderData.cs
- Attributes.cs
- ManagedIStream.cs
- HyperLinkColumn.cs
- BasicKeyConstraint.cs
- XmlWhitespace.cs
- CheckBoxStandardAdapter.cs
- DeferredSelectedIndexReference.cs
- FigureParagraph.cs
- RoutedUICommand.cs
- SafeRightsManagementPubHandle.cs
- CalendarButtonAutomationPeer.cs