Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- UdpUtility.cs
- WizardForm.cs
- DataPagerFieldCollection.cs
- Scripts.cs
- ToolStripEditorManager.cs
- AmbientLight.cs
- CryptoApi.cs
- WebProxyScriptElement.cs
- QueryStringParameter.cs
- PreviewPageInfo.cs
- FontInfo.cs
- TypeForwardedToAttribute.cs
- WebControlAdapter.cs
- CTreeGenerator.cs
- HostingMessageProperty.cs
- StorageModelBuildProvider.cs
- SelectionItemProviderWrapper.cs
- WebPartsPersonalizationAuthorization.cs
- EventsTab.cs
- ReflectionTypeLoadException.cs
- DurableErrorHandler.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- InternalConfigSettingsFactory.cs
- InfoCardProofToken.cs
- BitmapMetadataBlob.cs
- EdmSchemaAttribute.cs
- ConditionChanges.cs
- DigestTraceRecordHelper.cs
- TypeSystem.cs
- IDQuery.cs
- CollectionChangeEventArgs.cs
- UmAlQuraCalendar.cs
- SecurityTokenException.cs
- RowSpanVector.cs
- HScrollProperties.cs
- StructuralType.cs
- MultiBindingExpression.cs
- PropertyRecord.cs
- XamlSerializerUtil.cs
- Parameter.cs
- ErrorRuntimeConfig.cs
- SHA1Managed.cs
- activationcontext.cs
- GridViewColumnHeaderAutomationPeer.cs
- MemberAssignmentAnalysis.cs
- AppModelKnownContentFactory.cs
- StateBag.cs
- InputElement.cs
- TableChangeProcessor.cs
- FrameworkContentElement.cs
- PrefixQName.cs
- DecoderExceptionFallback.cs
- ListItemCollection.cs
- ZipIOExtraFieldElement.cs
- UpdatePanel.cs
- CompilerError.cs
- HijriCalendar.cs
- WizardForm.cs
- StateMachineHelpers.cs
- CacheEntry.cs
- glyphs.cs
- BitmapFrameDecode.cs
- ControlPropertyNameConverter.cs
- XmlSchemaValidationException.cs
- XmlDataSourceNodeDescriptor.cs
- FlowchartStart.xaml.cs
- Stackframe.cs
- OSFeature.cs
- MenuStrip.cs
- XmlRawWriter.cs
- XsltOutput.cs
- Annotation.cs
- TextRangeEdit.cs
- System.Data_BID.cs
- LocationSectionRecord.cs
- HtmlFormWrapper.cs
- CompensationParticipant.cs
- OdbcTransaction.cs
- DataGridViewColumnConverter.cs
- CounterCreationDataCollection.cs
- Rule.cs
- EncryptedXml.cs
- DelegatedStream.cs
- StylusCollection.cs
- TableRow.cs
- StylusEditingBehavior.cs
- HttpFileCollection.cs
- AppDomainUnloadedException.cs
- OleCmdHelper.cs
- WindowsRichEditRange.cs
- OdbcDataReader.cs
- DataGridRow.cs
- HttpDictionary.cs
- ErrorRuntimeConfig.cs
- ToolStripItemRenderEventArgs.cs
- JavaScriptObjectDeserializer.cs
- NavigationEventArgs.cs
- CqlQuery.cs
- TabItem.cs
- EnvelopedPkcs7.cs