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
- DesignTimeSiteMapProvider.cs
- SqlServices.cs
- ColorTransform.cs
- IFlowDocumentViewer.cs
- DictationGrammar.cs
- KnownTypes.cs
- httpserverutility.cs
- ReadOnlyHierarchicalDataSourceView.cs
- QuarticEase.cs
- DesignerContextDescriptor.cs
- CodeCatchClauseCollection.cs
- ListBoxAutomationPeer.cs
- UnsignedPublishLicense.cs
- XmlDataSource.cs
- xml.cs
- TickBar.cs
- PrintPreviewGraphics.cs
- UriExt.cs
- AspNetHostingPermission.cs
- IncrementalReadDecoders.cs
- TemplateContentLoader.cs
- ArgumentValueSerializer.cs
- ControlBuilderAttribute.cs
- InteropDesigner.xaml.cs
- RelationshipFixer.cs
- SafeCryptoHandles.cs
- HwndProxyElementProvider.cs
- DataTemplateKey.cs
- CompensateDesigner.cs
- Misc.cs
- HMACSHA384.cs
- COM2IProvidePropertyBuilderHandler.cs
- XmlSchemaCollection.cs
- BindingExpressionUncommonField.cs
- ConfigXmlSignificantWhitespace.cs
- _ConnectionGroup.cs
- ManagementBaseObject.cs
- FileReservationCollection.cs
- ReferenceEqualityComparer.cs
- SchemeSettingElementCollection.cs
- CellQuery.cs
- HtmlElementErrorEventArgs.cs
- cookiecollection.cs
- SqlUDTStorage.cs
- DataSourceXmlElementAttribute.cs
- StringConcat.cs
- Compensation.cs
- MsmqUri.cs
- SocketException.cs
- DataServiceContext.cs
- PTProvider.cs
- TypedReference.cs
- DesignerLoader.cs
- LinkTarget.cs
- AttachedAnnotation.cs
- CodeCommentStatement.cs
- UIElementIsland.cs
- SqlBulkCopy.cs
- GradientStop.cs
- BrowserDefinitionCollection.cs
- DataKey.cs
- AddInToken.cs
- ImageUrlEditor.cs
- ProcessMessagesAsyncResult.cs
- SplitterPanel.cs
- DbModificationCommandTree.cs
- IEnumerable.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- PermissionRequestEvidence.cs
- EventHandlerList.cs
- log.cs
- SizeAnimationBase.cs
- Profiler.cs
- GlobalizationSection.cs
- UnsafeNativeMethods.cs
- MsmqHostedTransportManager.cs
- TypedTableBase.cs
- TemplateComponentConnector.cs
- RichTextBox.cs
- RankException.cs
- BlurBitmapEffect.cs
- CellParagraph.cs
- RelatedView.cs
- _IPv6Address.cs
- ClientSettingsProvider.cs
- TableRow.cs
- ValidationVisibilityAttribute.cs
- TransactionOptions.cs
- ImageAttributes.cs
- XmlEncodedRawTextWriter.cs
- AuthorizationRule.cs
- Int16Animation.cs
- BulletChrome.cs
- DependencyObjectType.cs
- UmAlQuraCalendar.cs
- OperationFormatStyle.cs
- TemplatedMailWebEventProvider.cs
- DispatcherSynchronizationContext.cs
- ResourcesChangeInfo.cs
- DataSourceHelper.cs