Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / Diagnostics / SystemDiagnosticsSection.cs / 1 / SystemDiagnosticsSection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Configuration; namespace System.Diagnostics { internal class SystemDiagnosticsSection : ConfigurationSection { private static readonly ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propAssert = new ConfigurationProperty("assert", typeof(AssertSection), new AssertSection(), ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propPerfCounters = new ConfigurationProperty("performanceCounters", typeof(PerfCounterSection), new PerfCounterSection(), ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propSources = new ConfigurationProperty("sources", typeof(SourceElementsCollection), new SourceElementsCollection(), ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propSharedListeners = new ConfigurationProperty("sharedListeners", typeof(SharedListenerElementsCollection), new SharedListenerElementsCollection(), ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propSwitches = new ConfigurationProperty("switches", typeof(SwitchElementsCollection), new SwitchElementsCollection(), ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propTrace = new ConfigurationProperty("trace", typeof(TraceSection), new TraceSection(), ConfigurationPropertyOptions.None); static SystemDiagnosticsSection() { _properties = new ConfigurationPropertyCollection(); _properties.Add(_propAssert); _properties.Add(_propPerfCounters); _properties.Add(_propSources); _properties.Add(_propSharedListeners); _properties.Add(_propSwitches); _properties.Add(_propTrace); } [ConfigurationProperty("assert")] public AssertSection Assert { get { return (AssertSection) base[_propAssert]; } } [ConfigurationProperty("performanceCounters")] public PerfCounterSection PerfCounters { get { return (PerfCounterSection) base[_propPerfCounters]; } } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("sources")] public SourceElementsCollection Sources { get { return (SourceElementsCollection ) base[_propSources]; } } [ConfigurationProperty("sharedListeners")] public ListenerElementsCollection SharedListeners { get { return (ListenerElementsCollection) base[_propSharedListeners]; } } [ConfigurationProperty("switches")] public SwitchElementsCollection Switches { get { return (SwitchElementsCollection) base[_propSwitches]; } } [ConfigurationProperty("trace")] public TraceSection Trace { get { return (TraceSection) base[_propTrace]; } } protected override void InitializeDefault() { Trace.Listeners.InitializeDefaultInternal(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Configuration; namespace System.Diagnostics { internal class SystemDiagnosticsSection : ConfigurationSection { private static readonly ConfigurationPropertyCollection _properties; private static readonly ConfigurationProperty _propAssert = new ConfigurationProperty("assert", typeof(AssertSection), new AssertSection(), ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propPerfCounters = new ConfigurationProperty("performanceCounters", typeof(PerfCounterSection), new PerfCounterSection(), ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propSources = new ConfigurationProperty("sources", typeof(SourceElementsCollection), new SourceElementsCollection(), ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propSharedListeners = new ConfigurationProperty("sharedListeners", typeof(SharedListenerElementsCollection), new SharedListenerElementsCollection(), ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propSwitches = new ConfigurationProperty("switches", typeof(SwitchElementsCollection), new SwitchElementsCollection(), ConfigurationPropertyOptions.None); private static readonly ConfigurationProperty _propTrace = new ConfigurationProperty("trace", typeof(TraceSection), new TraceSection(), ConfigurationPropertyOptions.None); static SystemDiagnosticsSection() { _properties = new ConfigurationPropertyCollection(); _properties.Add(_propAssert); _properties.Add(_propPerfCounters); _properties.Add(_propSources); _properties.Add(_propSharedListeners); _properties.Add(_propSwitches); _properties.Add(_propTrace); } [ConfigurationProperty("assert")] public AssertSection Assert { get { return (AssertSection) base[_propAssert]; } } [ConfigurationProperty("performanceCounters")] public PerfCounterSection PerfCounters { get { return (PerfCounterSection) base[_propPerfCounters]; } } protected override ConfigurationPropertyCollection Properties { get { return _properties; } } [ConfigurationProperty("sources")] public SourceElementsCollection Sources { get { return (SourceElementsCollection ) base[_propSources]; } } [ConfigurationProperty("sharedListeners")] public ListenerElementsCollection SharedListeners { get { return (ListenerElementsCollection) base[_propSharedListeners]; } } [ConfigurationProperty("switches")] public SwitchElementsCollection Switches { get { return (SwitchElementsCollection) base[_propSwitches]; } } [ConfigurationProperty("trace")] public TraceSection Trace { get { return (TraceSection) base[_propTrace]; } } protected override void InitializeDefault() { Trace.Listeners.InitializeDefaultInternal(); } } } // 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
- brushes.cs
- CorrelationManager.cs
- HandleCollector.cs
- PropertyOverridesDialog.cs
- ControlUtil.cs
- OleDbConnectionInternal.cs
- dbdatarecord.cs
- PopupControlService.cs
- MdbDataFileEditor.cs
- CollectionView.cs
- UpnEndpointIdentityExtension.cs
- XmlUnspecifiedAttribute.cs
- XmlIncludeAttribute.cs
- HandoffBehavior.cs
- DataViewManager.cs
- OleDbPropertySetGuid.cs
- JobDuplex.cs
- CardSpacePolicyElement.cs
- ApplicationContext.cs
- ClientTargetCollection.cs
- SqlFunctionAttribute.cs
- EnumBuilder.cs
- FacetDescriptionElement.cs
- processwaithandle.cs
- LinearGradientBrush.cs
- TypeUtil.cs
- WindowsFormsHelpers.cs
- CookieParameter.cs
- SmiConnection.cs
- ProbeMatchesCD1.cs
- ActivityInfo.cs
- ManualResetEvent.cs
- VariableModifiersHelper.cs
- StateInitializationDesigner.cs
- NullRuntimeConfig.cs
- HashCryptoHandle.cs
- HandlerFactoryWrapper.cs
- ToolStripManager.cs
- ListViewGroupConverter.cs
- WebControlsSection.cs
- UxThemeWrapper.cs
- Vector3DValueSerializer.cs
- FrameworkElementAutomationPeer.cs
- DesignConnection.cs
- CapabilitiesAssignment.cs
- XpsException.cs
- DependencyObjectProvider.cs
- DataGridAddNewRow.cs
- SpecialTypeDataContract.cs
- webbrowsersite.cs
- StackBuilderSink.cs
- MdiWindowListItemConverter.cs
- ResourceManagerWrapper.cs
- ListBox.cs
- LineUtil.cs
- EncodingDataItem.cs
- DispatcherEventArgs.cs
- DataGridViewRowCollection.cs
- _ScatterGatherBuffers.cs
- ContentPresenter.cs
- NetMsmqSecurity.cs
- SwitchDesigner.xaml.cs
- EventLog.cs
- ApplicationSecurityManager.cs
- DependencyObject.cs
- HttpPostedFile.cs
- PreviewPageInfo.cs
- SecurityDescriptor.cs
- wmiutil.cs
- LineVisual.cs
- DataControlExtensions.cs
- Attributes.cs
- XXXInfos.cs
- ClassicBorderDecorator.cs
- DesignerAutoFormatStyle.cs
- ActivityMarkupSerializer.cs
- ProfileEventArgs.cs
- MarkupProperty.cs
- PageAsyncTaskManager.cs
- ConfigurationValidatorBase.cs
- CryptoStream.cs
- XmlMembersMapping.cs
- ScriptResourceHandler.cs
- AuthenticatedStream.cs
- Line.cs
- ChineseLunisolarCalendar.cs
- Pointer.cs
- EditorPartCollection.cs
- ProviderBase.cs
- namescope.cs
- AuthenticationConfig.cs
- DynamicDataRouteHandler.cs
- SafeHandles.cs
- HtmlElementCollection.cs
- HttpListenerException.cs
- UrlAuthFailedErrorFormatter.cs
- SendingRequestEventArgs.cs
- Page.cs
- GPRECTF.cs
- Pen.cs