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
- Section.cs
- SqlNotificationEventArgs.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- MetadataSource.cs
- ConfigPathUtility.cs
- EntitySqlQueryCacheKey.cs
- TemplateNameScope.cs
- AttachInfo.cs
- VersionedStreamOwner.cs
- SlotInfo.cs
- StringPropertyBuilder.cs
- EntityParameter.cs
- HttpCookieCollection.cs
- ResourceAttributes.cs
- CachingHintValidation.cs
- wgx_exports.cs
- JsonFormatReaderGenerator.cs
- WindowsAuthenticationEventArgs.cs
- InvokeWebServiceDesigner.cs
- DbConnectionFactory.cs
- AddInAttribute.cs
- ListViewItem.cs
- DefaultSection.cs
- LayoutTable.cs
- RuleRef.cs
- ExtractedStateEntry.cs
- TraceSection.cs
- DataGridViewUtilities.cs
- XmlQueryRuntime.cs
- EmptyImpersonationContext.cs
- GridViewDeleteEventArgs.cs
- XPathArrayIterator.cs
- ObjectDataSourceWizardForm.cs
- EmbossBitmapEffect.cs
- ProxyWebPartConnectionCollection.cs
- GradientSpreadMethodValidation.cs
- ManagedWndProcTracker.cs
- EasingQuaternionKeyFrame.cs
- InstalledVoice.cs
- CdpEqualityComparer.cs
- DiagnosticTrace.cs
- RoleServiceManager.cs
- DataGridViewCellValueEventArgs.cs
- LocalValueEnumerator.cs
- XmlElementAttribute.cs
- ListBoxAutomationPeer.cs
- WindowsRichEditRange.cs
- BmpBitmapEncoder.cs
- PromptEventArgs.cs
- SecurityElement.cs
- DataGridCellEditEndingEventArgs.cs
- FrameAutomationPeer.cs
- FrameworkTemplate.cs
- DispatcherTimer.cs
- Attachment.cs
- InkCanvasSelection.cs
- HttpCookie.cs
- EventSinkHelperWriter.cs
- TaiwanCalendar.cs
- WebPartAddingEventArgs.cs
- Peer.cs
- ByteAnimationUsingKeyFrames.cs
- RelationshipSet.cs
- ForEach.cs
- CounterCreationData.cs
- ToolStripItemCollection.cs
- PrimitiveSchema.cs
- IconHelper.cs
- ScriptResourceHandler.cs
- WorkerRequest.cs
- TextElementEnumerator.cs
- SpecialNameAttribute.cs
- TemplatedMailWebEventProvider.cs
- DrawListViewItemEventArgs.cs
- ExceptionHandlerDesigner.cs
- ValueConversionAttribute.cs
- ToolStripContentPanelRenderEventArgs.cs
- WorkflowStateRollbackService.cs
- Mappings.cs
- UnaryQueryOperator.cs
- Clock.cs
- DetailsView.cs
- GenericXmlSecurityToken.cs
- VirtualPathProvider.cs
- SecurityRuntime.cs
- QueryCursorEventArgs.cs
- SymDocumentType.cs
- XmlSchemaParticle.cs
- XPathSelfQuery.cs
- OdbcEnvironmentHandle.cs
- ParentUndoUnit.cs
- Models.cs
- ControlPaint.cs
- ZipIOExtraFieldElement.cs
- DataConnectionHelper.cs
- NativeMethods.cs
- XmlDictionaryReaderQuotas.cs
- TextContainerHelper.cs
- ITextView.cs
- InfoCardTraceRecord.cs