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
- SerializerProvider.cs
- RegionIterator.cs
- LinkedResource.cs
- PanelStyle.cs
- DescendentsWalker.cs
- GeneralTransform3DGroup.cs
- PointCollectionConverter.cs
- Rect.cs
- PreservationFileReader.cs
- PasswordPropertyTextAttribute.cs
- PersonalizationProviderCollection.cs
- DownloadProgressEventArgs.cs
- BeginStoryboard.cs
- UnionCodeGroup.cs
- PassportAuthenticationModule.cs
- EntityDataSourceWrapperCollection.cs
- FileLoadException.cs
- PageCache.cs
- MeshGeometry3D.cs
- DataGridViewColumnEventArgs.cs
- VisemeEventArgs.cs
- Line.cs
- DebuggerAttributes.cs
- ActionFrame.cs
- BaseTemplateCodeDomTreeGenerator.cs
- TreeNodeBinding.cs
- ActionFrame.cs
- FixedNode.cs
- TextBoxAutoCompleteSourceConverter.cs
- ArgumentNullException.cs
- DesignTimeParseData.cs
- Icon.cs
- OdbcParameterCollection.cs
- ActivationArguments.cs
- SimpleExpression.cs
- WebPartAddingEventArgs.cs
- PatternMatchRules.cs
- ValidatingPropertiesEventArgs.cs
- FixedSchema.cs
- ResourceDescriptionAttribute.cs
- UnaryNode.cs
- NamedElement.cs
- SafeNativeMethods.cs
- StatusBarPanel.cs
- NumberFunctions.cs
- FirstMatchCodeGroup.cs
- XmlILStorageConverter.cs
- AttachedAnnotation.cs
- StoreItemCollection.cs
- ObjectStateManagerMetadata.cs
- WindowsRebar.cs
- ConnectionPoint.cs
- PropertyAccessVisitor.cs
- datacache.cs
- SettingsSavedEventArgs.cs
- ClearTypeHintValidation.cs
- Span.cs
- RTLAwareMessageBox.cs
- RoutedUICommand.cs
- sitestring.cs
- ThreadExceptionEvent.cs
- GetPageCompletedEventArgs.cs
- InputProviderSite.cs
- EmptyElement.cs
- RegisteredScript.cs
- TaiwanCalendar.cs
- CodeNamespaceImportCollection.cs
- HexParser.cs
- DetailsViewUpdatedEventArgs.cs
- DrawingGroup.cs
- SiteIdentityPermission.cs
- ConfigurationElementProperty.cs
- VisualBrush.cs
- SamlAuthorizationDecisionStatement.cs
- InternalsVisibleToAttribute.cs
- IfAction.cs
- ResourceAttributes.cs
- FlowPanelDesigner.cs
- TableRow.cs
- XmlNamespaceMappingCollection.cs
- WebPartManager.cs
- HtmlShimManager.cs
- ExpressionConverter.cs
- EntitySqlQueryCacheEntry.cs
- AnnotationService.cs
- CreateUserWizard.cs
- DataGridViewRowPrePaintEventArgs.cs
- MostlySingletonList.cs
- MediaContext.cs
- ListManagerBindingsCollection.cs
- CodeDirectiveCollection.cs
- MessageQueueCriteria.cs
- GroupItemAutomationPeer.cs
- WebPartTransformerAttribute.cs
- ToolTipService.cs
- BinaryParser.cs
- SimpleFieldTemplateUserControl.cs
- ExtendedProperty.cs
- ObjectItemCachedAssemblyLoader.cs
- SequenceNumber.cs