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
- DataGridViewLinkColumn.cs
- SystemUdpStatistics.cs
- XmlNullResolver.cs
- StreamWithDictionary.cs
- SystemIcmpV4Statistics.cs
- TerminateDesigner.cs
- SqlUnionizer.cs
- OracleRowUpdatingEventArgs.cs
- WebEventTraceProvider.cs
- _WebProxyDataBuilder.cs
- SafeArchiveContext.cs
- DataBoundControlHelper.cs
- CompositeFontInfo.cs
- bindurihelper.cs
- UMPAttributes.cs
- TrackingMemoryStream.cs
- SpellCheck.cs
- TraceFilter.cs
- figurelength.cs
- ParameterBuilder.cs
- MetaTableHelper.cs
- InfiniteTimeSpanConverter.cs
- XmlCDATASection.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- TypeForwardedFromAttribute.cs
- AssemblyNameProxy.cs
- AutomationPatternInfo.cs
- DataConnectionHelper.cs
- TextStore.cs
- ScriptingSectionGroup.cs
- DrawTreeNodeEventArgs.cs
- ObjectNavigationPropertyMapping.cs
- UrlMappingsModule.cs
- OracleRowUpdatingEventArgs.cs
- RadioButtonFlatAdapter.cs
- HtmlImage.cs
- PngBitmapEncoder.cs
- LongMinMaxAggregationOperator.cs
- NullableDoubleMinMaxAggregationOperator.cs
- TCPListener.cs
- StatusBarDrawItemEvent.cs
- XmlSchemaValidator.cs
- ArrayElementGridEntry.cs
- OptionUsage.cs
- SkewTransform.cs
- SelectedGridItemChangedEvent.cs
- SecurityTokenSpecification.cs
- AppSettingsReader.cs
- Camera.cs
- EncryptedData.cs
- CompositeDataBoundControl.cs
- EventLogEntryCollection.cs
- DecoratedNameAttribute.cs
- BidPrivateBase.cs
- WindowsEditBoxRange.cs
- UxThemeWrapper.cs
- _AutoWebProxyScriptEngine.cs
- CompiledQueryCacheEntry.cs
- TreeView.cs
- panel.cs
- MessageBox.cs
- BamlLocalizableResourceKey.cs
- ComboBox.cs
- SystemFonts.cs
- dataSvcMapFileLoader.cs
- FixedDocumentSequencePaginator.cs
- HttpListenerResponse.cs
- XXXOnTypeBuilderInstantiation.cs
- BitHelper.cs
- TemplateField.cs
- AssemblyBuilder.cs
- FillRuleValidation.cs
- GradientStopCollection.cs
- FixedStringLookup.cs
- KoreanCalendar.cs
- RightsManagementEncryptionTransform.cs
- SqlFunctionAttribute.cs
- GridLengthConverter.cs
- MemberPath.cs
- XmlWrappingWriter.cs
- GifBitmapDecoder.cs
- BindingValueChangedEventArgs.cs
- ControlParser.cs
- Error.cs
- ConditionValidator.cs
- RewritingValidator.cs
- UnhandledExceptionEventArgs.cs
- XmlTextReader.cs
- ModuleBuilder.cs
- EnumBuilder.cs
- InstanceNormalEvent.cs
- Random.cs
- StringUtil.cs
- Stopwatch.cs
- MimeAnyImporter.cs
- WindowsTreeView.cs
- ItemDragEvent.cs
- XmlSchemaSimpleTypeRestriction.cs
- OdbcReferenceCollection.cs
- SqlDataSource.cs