Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / Diagnostics / SystemDiagnosticsSection.cs / 1305376 / 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
- WinFormsSpinner.cs
- Switch.cs
- ButtonRenderer.cs
- AssertSection.cs
- ObjectItemAssemblyLoader.cs
- WrapPanel.cs
- CheckBoxAutomationPeer.cs
- ContainerParagraph.cs
- BuildTopDownAttribute.cs
- XmlObjectSerializerReadContextComplex.cs
- ObjectStateManager.cs
- GregorianCalendarHelper.cs
- SettingsContext.cs
- ByteStreamMessageEncodingElement.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- AuthenticationServiceManager.cs
- AccessDataSourceWizardForm.cs
- StreamWriter.cs
- SqlDataRecord.cs
- SystemIcons.cs
- RequiredArgumentAttribute.cs
- ContainerParagraph.cs
- MouseGesture.cs
- HttpException.cs
- SerializationObjectManager.cs
- QilTargetType.cs
- PreviewPrintController.cs
- ParallelEnumerableWrapper.cs
- X509SecurityTokenAuthenticator.cs
- LiteralControl.cs
- TraceHandlerErrorFormatter.cs
- PingReply.cs
- TextServicesCompartmentContext.cs
- DefaultTraceListener.cs
- DataGridViewRow.cs
- LogicalExpressionEditor.cs
- VersionedStream.cs
- TreeWalker.cs
- NullEntityWrapper.cs
- BrowserDefinitionCollection.cs
- DispatcherHooks.cs
- EmptyEnumerable.cs
- DateTimeFormat.cs
- TextEditor.cs
- HelpInfo.cs
- ServicesExceptionNotHandledEventArgs.cs
- DelegatingMessage.cs
- SoundPlayerAction.cs
- COM2ICategorizePropertiesHandler.cs
- ListItemViewControl.cs
- EmbeddedObject.cs
- Mappings.cs
- ComponentResourceKey.cs
- ConfigurationSectionGroup.cs
- BitmapImage.cs
- RegexCode.cs
- GridSplitter.cs
- WebServiceEnumData.cs
- ParallelEnumerableWrapper.cs
- DirtyTextRange.cs
- BaseParagraph.cs
- SqlDataSourceEnumerator.cs
- ScriptingSectionGroup.cs
- PathFigureCollectionValueSerializer.cs
- ProfileSettingsCollection.cs
- Version.cs
- TypeToStringValueConverter.cs
- ListViewItemEventArgs.cs
- MethodSignatureGenerator.cs
- GeneralTransform2DTo3D.cs
- TextEditorThreadLocalStore.cs
- ConstraintConverter.cs
- HandoffBehavior.cs
- ControlEvent.cs
- IList.cs
- ThaiBuddhistCalendar.cs
- FrameworkRichTextComposition.cs
- ButtonField.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- EntityDataSourceUtil.cs
- DataGridParentRows.cs
- CodeMethodInvokeExpression.cs
- FilterFactory.cs
- PersistStreamTypeWrapper.cs
- CodeIndexerExpression.cs
- NativeMethods.cs
- HierarchicalDataTemplate.cs
- returneventsaver.cs
- Quad.cs
- QueryOpeningEnumerator.cs
- ProgressBarBrushConverter.cs
- CryptoApi.cs
- OleTxTransaction.cs
- QilStrConcatenator.cs
- BaseTemplateCodeDomTreeGenerator.cs
- GenericTypeParameterBuilder.cs
- ServiceBusyException.cs
- DoubleAnimation.cs
- StateRuntime.cs
- SessionEndingEventArgs.cs