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
- StreamWriter.cs
- ConstructorBuilder.cs
- QuadraticBezierSegment.cs
- SmtpReplyReaderFactory.cs
- NamespaceQuery.cs
- ValueChangedEventManager.cs
- ConnectionStringsSection.cs
- StateRuntime.cs
- ListDictionaryInternal.cs
- X509Certificate2Collection.cs
- EventDescriptor.cs
- SqlDataSourceQueryConverter.cs
- PropertyRecord.cs
- ChangeNode.cs
- InternalSafeNativeMethods.cs
- DataGridRow.cs
- TextChangedEventArgs.cs
- ExtendedProtectionPolicyTypeConverter.cs
- JsonWriterDelegator.cs
- ProviderSettingsCollection.cs
- WebContext.cs
- OperandQuery.cs
- LocalizabilityAttribute.cs
- _SafeNetHandles.cs
- UpDownBase.cs
- Soap.cs
- X509RawDataKeyIdentifierClause.cs
- TextReader.cs
- ExtensionQuery.cs
- Int16AnimationUsingKeyFrames.cs
- Assert.cs
- Code.cs
- GridViewRowPresenter.cs
- EncodingDataItem.cs
- PathFigureCollectionConverter.cs
- TraceSection.cs
- StateChangeEvent.cs
- DbReferenceCollection.cs
- PersonalizationStateQuery.cs
- Fonts.cs
- DrawingCollection.cs
- TripleDESCryptoServiceProvider.cs
- Error.cs
- TriggerAction.cs
- _Events.cs
- DataKey.cs
- SessionState.cs
- TextRangeAdaptor.cs
- SqlDataSource.cs
- FlowDecisionDesigner.xaml.cs
- SaveFileDialogDesigner.cs
- CustomTrackingQuery.cs
- CodeIndexerExpression.cs
- DependencyObjectPropertyDescriptor.cs
- AnimationClockResource.cs
- CompilerErrorCollection.cs
- CustomServiceCredentials.cs
- StateWorkerRequest.cs
- CannotUnloadAppDomainException.cs
- BehaviorEditorPart.cs
- FormatterServices.cs
- QilParameter.cs
- SafePEFileHandle.cs
- TextBoxBase.cs
- CommandLineParser.cs
- TransformGroup.cs
- InvokeBase.cs
- HtmlImage.cs
- RuntimeConfig.cs
- OleDbConnectionFactory.cs
- MetadataArtifactLoaderCompositeFile.cs
- UIHelper.cs
- OdbcEnvironment.cs
- LockedActivityGlyph.cs
- Literal.cs
- UnionCqlBlock.cs
- WebException.cs
- CryptoConfig.cs
- DataBindingExpressionBuilder.cs
- PageBuildProvider.cs
- BindingValueChangedEventArgs.cs
- BindingGroup.cs
- BinaryObjectInfo.cs
- XXXInfos.cs
- SafeProcessHandle.cs
- ListControl.cs
- TreeNode.cs
- x509utils.cs
- SafeNativeMethods.cs
- SQLInt16.cs
- InkPresenterAutomationPeer.cs
- GetWinFXPath.cs
- String.cs
- DbConnectionInternal.cs
- XmlDataCollection.cs
- TextTreeInsertUndoUnit.cs
- RelatedCurrencyManager.cs
- AvTrace.cs
- Point.cs
- DataGridItem.cs