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
- SpellerHighlightLayer.cs
- Signature.cs
- WebZoneDesigner.cs
- JpegBitmapDecoder.cs
- BamlRecordWriter.cs
- SingleResultAttribute.cs
- WriteFileContext.cs
- filewebrequest.cs
- WebSysDisplayNameAttribute.cs
- ProgressiveCrcCalculatingStream.cs
- ExpressionTable.cs
- DecoderFallback.cs
- SHA256Cng.cs
- LinkClickEvent.cs
- ReferentialConstraint.cs
- MessageQueue.cs
- FileDialogCustomPlace.cs
- Rotation3DAnimationBase.cs
- TimelineCollection.cs
- HtmlHead.cs
- ManifestSignedXml.cs
- ContentTextAutomationPeer.cs
- SendSecurityHeader.cs
- TextPenaltyModule.cs
- PrinterResolution.cs
- DrawListViewItemEventArgs.cs
- ObjectDataSourceEventArgs.cs
- translator.cs
- SpotLight.cs
- BridgeDataReader.cs
- Timeline.cs
- ToolStripContentPanelRenderEventArgs.cs
- ScriptReference.cs
- Pen.cs
- SHA256.cs
- TraceFilter.cs
- EtwTrace.cs
- TextBox.cs
- InputLanguageEventArgs.cs
- SemanticResolver.cs
- EditingScopeUndoUnit.cs
- LocalBuilder.cs
- ADMembershipProvider.cs
- WebPartConnectionCollection.cs
- WebConfigurationHostFileChange.cs
- PartialCachingAttribute.cs
- FontSizeConverter.cs
- FlowchartDesigner.Helpers.cs
- MessageBuffer.cs
- CancellationHandlerDesigner.cs
- KeyInterop.cs
- CoreSwitches.cs
- CommandSet.cs
- ConstraintManager.cs
- ToolStripContentPanelDesigner.cs
- IdentityValidationException.cs
- Rights.cs
- XPathCompileException.cs
- AjaxFrameworkAssemblyAttribute.cs
- ElementMarkupObject.cs
- TransactionScopeDesigner.cs
- ScrollItemPattern.cs
- IIS7WorkerRequest.cs
- BindingContext.cs
- BaseValidator.cs
- QueryOutputWriter.cs
- FixedPosition.cs
- XmlEnumAttribute.cs
- ConsoleTraceListener.cs
- TextUtf8RawTextWriter.cs
- MetadataItemSerializer.cs
- SafePipeHandle.cs
- ProfileParameter.cs
- ContainerControlDesigner.cs
- DataRelationPropertyDescriptor.cs
- SchemaComplexType.cs
- ArgumentException.cs
- Encoder.cs
- ToolStripMenuItem.cs
- NativeMethods.cs
- KoreanCalendar.cs
- StyleCollection.cs
- DefaultHttpHandler.cs
- WindowsAuthenticationEventArgs.cs
- EmissiveMaterial.cs
- Blend.cs
- InternalPermissions.cs
- UndirectedGraph.cs
- XmlSchemaAnyAttribute.cs
- TaiwanCalendar.cs
- XmlLoader.cs
- StrongNameUtility.cs
- CodeDomSerializerException.cs
- XmlAnyElementAttribute.cs
- ConnectionStringsExpressionBuilder.cs
- PaginationProgressEventArgs.cs
- XmlAttributeCollection.cs
- XPathNodePointer.cs
- FontStyles.cs
- ThaiBuddhistCalendar.cs