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
- XmlNamedNodeMap.cs
- UrlPath.cs
- LocationUpdates.cs
- TextBoxAutoCompleteSourceConverter.cs
- CacheRequest.cs
- XsdBuildProvider.cs
- WebDisplayNameAttribute.cs
- InlinedAggregationOperator.cs
- ComponentCommands.cs
- PointHitTestParameters.cs
- DoubleStorage.cs
- DeferredReference.cs
- XmlElementAttributes.cs
- TdsParserStateObject.cs
- invalidudtexception.cs
- Compilation.cs
- ParamArrayAttribute.cs
- NavigationPropertySingletonExpression.cs
- DiscoveryMessageSequenceCD1.cs
- SettingsProperty.cs
- XmlArrayAttribute.cs
- ToolboxItemFilterAttribute.cs
- FormClosedEvent.cs
- FloaterBaseParaClient.cs
- UserPreferenceChangingEventArgs.cs
- InfoCard.cs
- ListViewUpdateEventArgs.cs
- EventLog.cs
- ForeignKeyConstraint.cs
- TextElement.cs
- XamlWrapperReaders.cs
- BitArray.cs
- MonitorWrapper.cs
- XmlIgnoreAttribute.cs
- DecoderNLS.cs
- BaseCodePageEncoding.cs
- WebServiceReceiveDesigner.cs
- AssemblyInfo.cs
- ApplicationDirectory.cs
- StreamUpdate.cs
- BrushConverter.cs
- AssertSection.cs
- FastPropertyAccessor.cs
- CheckBox.cs
- SoapIncludeAttribute.cs
- SimpleBitVector32.cs
- MemberHolder.cs
- ResourceProviderFactory.cs
- SystemDropShadowChrome.cs
- ObjectHandle.cs
- ComboBoxRenderer.cs
- TransformerInfo.cs
- ExecutionContext.cs
- DebugController.cs
- itemelement.cs
- LexicalChunk.cs
- DataSourceUtil.cs
- DirectionalLight.cs
- WebBrowserNavigatedEventHandler.cs
- TextServicesProperty.cs
- DefinitionBase.cs
- UInt16Storage.cs
- LoginView.cs
- StrokeNode.cs
- LookupBindingPropertiesAttribute.cs
- connectionpool.cs
- XmlSchemaInferenceException.cs
- ControlEvent.cs
- IItemProperties.cs
- Span.cs
- BamlMapTable.cs
- XslUrlEditor.cs
- Messages.cs
- MetadataItem_Static.cs
- RemotingServices.cs
- WebConfigurationHost.cs
- Style.cs
- objectresult_tresulttype.cs
- KeyTime.cs
- CompositeDataBoundControl.cs
- XmlSchemaAnnotation.cs
- OracleTimeSpan.cs
- FigureHelper.cs
- DateTimeFormatInfoScanner.cs
- IndentTextWriter.cs
- TCEAdapterGenerator.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- CssTextWriter.cs
- CompositeDesignerAccessibleObject.cs
- ActiveDesignSurfaceEvent.cs
- MachineKeySection.cs
- QilChoice.cs
- SqlDataSourceQueryConverter.cs
- MatchAttribute.cs
- CellTreeNodeVisitors.cs
- SwitchAttribute.cs
- ConstraintConverter.cs
- XmlTypeMapping.cs
- FragmentQuery.cs
- ReferenceEqualityComparer.cs