Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DataGridViewColumnConverter.cs
- RegexWorker.cs
- RoutedEventArgs.cs
- TypeToken.cs
- TextLineBreak.cs
- DataSourceHelper.cs
- OleCmdHelper.cs
- MethodImplAttribute.cs
- BitmapFrame.cs
- BamlResourceSerializer.cs
- CodePrimitiveExpression.cs
- SocketException.cs
- FormViewDeletedEventArgs.cs
- StrongName.cs
- CqlLexer.cs
- ZipIOExtraFieldZip64Element.cs
- SolidColorBrush.cs
- ToolBarTray.cs
- DeferredElementTreeState.cs
- ItemType.cs
- InlineCollection.cs
- XXXOnTypeBuilderInstantiation.cs
- VBIdentifierTrimConverter.cs
- FileChangesMonitor.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- DataExpression.cs
- ClassDataContract.cs
- MappingException.cs
- ValidationError.cs
- SortAction.cs
- PointF.cs
- XmlSchemaComplexContentRestriction.cs
- WebPartMovingEventArgs.cs
- Utility.cs
- DesignerPerfEventProvider.cs
- StylusPlugInCollection.cs
- login.cs
- XPathNodePointer.cs
- HttpHandler.cs
- RegionInfo.cs
- TemplatePropertyEntry.cs
- PasswordTextNavigator.cs
- TypeUnloadedException.cs
- ViewManagerAttribute.cs
- ToolStripSplitStackLayout.cs
- StrongNameIdentityPermission.cs
- GeometryModel3D.cs
- StringPropertyBuilder.cs
- FlowchartStart.xaml.cs
- LicFileLicenseProvider.cs
- ArraySegment.cs
- OpenFileDialog.cs
- SingleSelectRootGridEntry.cs
- QuestionEventArgs.cs
- TextEditorMouse.cs
- Memoizer.cs
- CodeDOMUtility.cs
- UIElementPropertyUndoUnit.cs
- OleDbException.cs
- MetadataUtilsSmi.cs
- InvalidPrinterException.cs
- BitStack.cs
- PreProcessor.cs
- ReadOnlyHierarchicalDataSource.cs
- CustomCategoryAttribute.cs
- WebPartMinimizeVerb.cs
- _TLSstream.cs
- WebPartDisplayModeCollection.cs
- Fonts.cs
- DispatcherObject.cs
- LogWriteRestartAreaAsyncResult.cs
- SimpleModelProvider.cs
- TextTrailingWordEllipsis.cs
- SmtpClient.cs
- XmlText.cs
- CommandConverter.cs
- AnimationTimeline.cs
- JsonQNameDataContract.cs
- GridLengthConverter.cs
- FloatUtil.cs
- HttpListenerRequestUriBuilder.cs
- DirectoryInfo.cs
- QuaternionRotation3D.cs
- InvalidateEvent.cs
- ArgumentOutOfRangeException.cs
- NativeConfigurationLoader.cs
- NameTable.cs
- MsmqIntegrationValidationBehavior.cs
- IntSecurity.cs
- WebPartEditorCancelVerb.cs
- Int32Converter.cs
- OdbcDataReader.cs
- BuilderInfo.cs
- __ConsoleStream.cs
- ContentElement.cs
- ListViewUpdateEventArgs.cs
- AuthenticationSection.cs
- ContextMenuStripActionList.cs
- MediaElementAutomationPeer.cs
- DataGridViewColumnStateChangedEventArgs.cs