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
- MenuItemAutomationPeer.cs
- EnvelopeVersion.cs
- Assembly.cs
- ContainerUtilities.cs
- HttpListenerResponse.cs
- TemplateKeyConverter.cs
- NetworkInformationException.cs
- ConvertersCollection.cs
- RequestQueue.cs
- SHA1Managed.cs
- RuleSettingsCollection.cs
- DbQueryCommandTree.cs
- DBNull.cs
- HitTestParameters3D.cs
- DbConnectionPoolIdentity.cs
- SelectionListComponentEditor.cs
- JsonWriter.cs
- MexHttpBindingCollectionElement.cs
- ClientBuildManager.cs
- HttpVersion.cs
- Vector3DValueSerializer.cs
- CollaborationHelperFunctions.cs
- PropertyPath.cs
- SecUtil.cs
- FormatConvertedBitmap.cs
- SystemIPInterfaceStatistics.cs
- SecurityDocument.cs
- GridView.cs
- RelationalExpressions.cs
- StatusBarDesigner.cs
- ImageConverter.cs
- Matrix.cs
- CommentEmitter.cs
- DataGridViewRowStateChangedEventArgs.cs
- Task.cs
- UserControlAutomationPeer.cs
- AppDomain.cs
- RangeBase.cs
- TabControlEvent.cs
- GregorianCalendarHelper.cs
- TextDecorationCollectionConverter.cs
- Operand.cs
- SoundPlayerAction.cs
- SocketAddress.cs
- CmsInterop.cs
- BitmapEffectGroup.cs
- MultiView.cs
- RightsManagementEncryptedStream.cs
- LocalFileSettingsProvider.cs
- ImageCollectionCodeDomSerializer.cs
- InternalResources.cs
- FormViewDesigner.cs
- DataGridViewColumnCollectionDialog.cs
- XmlSchemaNotation.cs
- InstalledFontCollection.cs
- UserNamePasswordServiceCredential.cs
- PartManifestEntry.cs
- AssemblyLoader.cs
- RevocationPoint.cs
- WebPartPersonalization.cs
- Processor.cs
- ColorDialog.cs
- SetStoryboardSpeedRatio.cs
- XmlUtf8RawTextWriter.cs
- ObjectDataSourceFilteringEventArgs.cs
- DebugView.cs
- HttpFormatExtensions.cs
- TemplateParser.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- AnimationClock.cs
- Stackframe.cs
- SettingsPropertyIsReadOnlyException.cs
- cookieexception.cs
- SynchronizingStream.cs
- AuthenticationModuleElement.cs
- SendingRequestEventArgs.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- TypeSchema.cs
- CommandLibraryHelper.cs
- DeploymentSectionCache.cs
- CannotUnloadAppDomainException.cs
- TableRowGroup.cs
- recordstate.cs
- SerialPort.cs
- ExpressionBuilderContext.cs
- Scripts.cs
- TemplateBuilder.cs
- RenderData.cs
- XPathMultyIterator.cs
- ToolboxCategoryItems.cs
- WebPartManager.cs
- AnnotationDocumentPaginator.cs
- DurableInstanceProvider.cs
- TreeNodeMouseHoverEvent.cs
- DebugView.cs
- TraceContext.cs
- PerfCounterSection.cs
- TagNameToTypeMapper.cs
- CheckableControlBaseAdapter.cs
- DbParameterCollectionHelper.cs