Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DictionaryEditChange.cs
- _DigestClient.cs
- WS2007FederationHttpBindingElement.cs
- RegisteredArrayDeclaration.cs
- WebScriptMetadataMessageEncoderFactory.cs
- SafeNativeMethodsOther.cs
- StaticSiteMapProvider.cs
- HiddenField.cs
- CryptoApi.cs
- ReferenceEqualityComparer.cs
- CompModSwitches.cs
- ZipIOCentralDirectoryBlock.cs
- SchemaImporterExtensionElement.cs
- remotingproxy.cs
- ComponentRenameEvent.cs
- DeviceContexts.cs
- CompositeFontFamily.cs
- ImageSourceValueSerializer.cs
- ReferencedCollectionType.cs
- DPTypeDescriptorContext.cs
- FormViewDeletedEventArgs.cs
- XsdBuilder.cs
- MultipartIdentifier.cs
- TrustLevel.cs
- StoreAnnotationsMap.cs
- FileUtil.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- DataComponentMethodGenerator.cs
- UiaCoreProviderApi.cs
- CodeDirectiveCollection.cs
- HttpDigestClientCredential.cs
- RegularExpressionValidator.cs
- SafeEventLogReadHandle.cs
- KerberosSecurityTokenProvider.cs
- InternalConfigRoot.cs
- WebServiceErrorEvent.cs
- StrokeNodeData.cs
- XpsLiterals.cs
- ParserStreamGeometryContext.cs
- Rotation3DKeyFrameCollection.cs
- ObjectDataProvider.cs
- PermissionAttributes.cs
- InstanceOwner.cs
- Button.cs
- OleAutBinder.cs
- ListenerElementsCollection.cs
- RemoteWebConfigurationHostStream.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- RunInstallerAttribute.cs
- SearchForVirtualItemEventArgs.cs
- ToolStripComboBox.cs
- FontWeights.cs
- CodeCompiler.cs
- DispatcherHookEventArgs.cs
- EventDescriptor.cs
- XmlLanguage.cs
- TextBoxBase.cs
- PageCatalogPart.cs
- XmlAnyElementAttribute.cs
- DashStyle.cs
- RenderingEventArgs.cs
- ValidationHelper.cs
- MatrixKeyFrameCollection.cs
- DocumentOrderComparer.cs
- XmlMemberMapping.cs
- GridView.cs
- RelationshipEndCollection.cs
- UnmanagedMemoryStream.cs
- BaseTemplatedMobileComponentEditor.cs
- WindowsTab.cs
- DataPagerCommandEventArgs.cs
- ChildTable.cs
- TableDetailsRow.cs
- InteropBitmapSource.cs
- TTSVoice.cs
- AQNBuilder.cs
- LightweightCodeGenerator.cs
- RotateTransform3D.cs
- QuaternionAnimationUsingKeyFrames.cs
- MappingMetadataHelper.cs
- HttpsChannelListener.cs
- DefaultProxySection.cs
- BamlRecordHelper.cs
- MetadataArtifactLoaderComposite.cs
- StringUtil.cs
- XsltContext.cs
- FrameworkRichTextComposition.cs
- BlurEffect.cs
- OracleRowUpdatedEventArgs.cs
- Themes.cs
- SchemaAttDef.cs
- GridEntry.cs
- VersionedStream.cs
- AmbiguousMatchException.cs
- ControlBuilder.cs
- SqlStatistics.cs
- SpellerHighlightLayer.cs
- RawStylusSystemGestureInputReport.cs
- JoinElimination.cs
- HwndStylusInputProvider.cs