Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DoWorkEventArgs.cs
- PermissionToken.cs
- DesignerActionPropertyItem.cs
- DSACryptoServiceProvider.cs
- ExpandedProjectionNode.cs
- Accessible.cs
- MetadataPropertyAttribute.cs
- UrlMappingCollection.cs
- RankException.cs
- RichTextBox.cs
- SessionParameter.cs
- KeyValuePairs.cs
- ListViewTableRow.cs
- Attributes.cs
- WindowsToolbarItemAsMenuItem.cs
- InvalidContentTypeException.cs
- EditorPartChrome.cs
- ClassData.cs
- SmtpFailedRecipientException.cs
- ButtonChrome.cs
- SafeLibraryHandle.cs
- CompilerCollection.cs
- DtrList.cs
- StylusEventArgs.cs
- CallTemplateAction.cs
- CodeAssignStatement.cs
- ContainerUtilities.cs
- PerformanceCounterManager.cs
- VirtualDirectoryMapping.cs
- InvariantComparer.cs
- UniqueIdentifierService.cs
- TraceSection.cs
- DataGridViewColumnCollection.cs
- BinaryFormatterWriter.cs
- SQLInt32.cs
- AttributeParameterInfo.cs
- Vertex.cs
- TreeView.cs
- LoadGrammarCompletedEventArgs.cs
- UserPreferenceChangingEventArgs.cs
- ThemeInfoAttribute.cs
- Directory.cs
- Grant.cs
- MemoryMappedFileSecurity.cs
- TargetInvocationException.cs
- RewritingSimplifier.cs
- FacetValueContainer.cs
- GridViewCellAutomationPeer.cs
- ElementsClipboardData.cs
- ConsoleKeyInfo.cs
- Point.cs
- PerspectiveCamera.cs
- VirtualPathProvider.cs
- XmlSerializerAssemblyAttribute.cs
- FirstMatchCodeGroup.cs
- XamlToRtfWriter.cs
- ServiceBehaviorAttribute.cs
- x509utils.cs
- Roles.cs
- FindCompletedEventArgs.cs
- RuntimeCompatibilityAttribute.cs
- NullableLongAverageAggregationOperator.cs
- BlurBitmapEffect.cs
- OleDbCommandBuilder.cs
- AlternationConverter.cs
- LogicalExpr.cs
- PartDesigner.cs
- Keyboard.cs
- EventLogger.cs
- ApplyTemplatesAction.cs
- LocalBuilder.cs
- JournalEntryListConverter.cs
- _UncName.cs
- ImageKeyConverter.cs
- FlowDocumentView.cs
- MsmqUri.cs
- SourceLineInfo.cs
- SqlDeflator.cs
- DependencyObject.cs
- Calendar.cs
- WebBrowserBase.cs
- PageThemeParser.cs
- EnvelopedPkcs7.cs
- MemberDomainMap.cs
- SqlConnection.cs
- CTreeGenerator.cs
- MultipleViewProviderWrapper.cs
- DirectoryInfo.cs
- TextEndOfParagraph.cs
- FormViewUpdateEventArgs.cs
- MediaElement.cs
- Route.cs
- DoubleAverageAggregationOperator.cs
- WmlCalendarAdapter.cs
- ObjectSecurity.cs
- XmlFormatExtensionPrefixAttribute.cs
- WaitHandleCannotBeOpenedException.cs
- SectionXmlInfo.cs
- OleDbException.cs
- SqlAggregateChecker.cs