Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- Pen.cs
- DesignerActionListCollection.cs
- ExecutionTracker.cs
- InternalEnumValidatorAttribute.cs
- PriorityBindingExpression.cs
- KeyGestureConverter.cs
- WebResourceUtil.cs
- ActivitySurrogateSelector.cs
- DataRowExtensions.cs
- _Semaphore.cs
- AdornedElementPlaceholder.cs
- SelfIssuedAuthAsymmetricKey.cs
- AuthorizationRule.cs
- StorageTypeMapping.cs
- CompositeActivityTypeDescriptorProvider.cs
- ClassDataContract.cs
- ActivityAction.cs
- ToolBarPanel.cs
- BitVector32.cs
- HtmlListAdapter.cs
- Polyline.cs
- Queue.cs
- FileClassifier.cs
- SimpleWebHandlerParser.cs
- CoreSwitches.cs
- FileSecurity.cs
- IpcPort.cs
- SignatureToken.cs
- DataRow.cs
- pingexception.cs
- Span.cs
- TextPointerBase.cs
- SqlMultiplexer.cs
- GridViewColumnHeader.cs
- LayoutEngine.cs
- IsolatedStorageFileStream.cs
- AmbientProperties.cs
- NativeMethods.cs
- TableHeaderCell.cs
- CacheMemory.cs
- ReadingWritingEntityEventArgs.cs
- XPathSelfQuery.cs
- InitializingNewItemEventArgs.cs
- FieldBuilder.cs
- SoapSchemaExporter.cs
- BufferedReadStream.cs
- MemoryPressure.cs
- BindingContext.cs
- StaticTextPointer.cs
- DesignerSerializationVisibilityAttribute.cs
- ListControl.cs
- HasCopySemanticsAttribute.cs
- baseaxisquery.cs
- WrappedIUnknown.cs
- SymbolMethod.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- ObjectIDGenerator.cs
- SystemUnicastIPAddressInformation.cs
- regiisutil.cs
- UIHelper.cs
- ExpandedProjectionNode.cs
- AudioStateChangedEventArgs.cs
- SplashScreen.cs
- ResolveCriteria.cs
- DataRowCollection.cs
- ListParagraph.cs
- DtrList.cs
- DefaultSerializationProviderAttribute.cs
- ChangesetResponse.cs
- KeyValuePair.cs
- recordstatefactory.cs
- PolicyManager.cs
- SQLBinaryStorage.cs
- ObjectListFieldCollection.cs
- UnsafeNativeMethodsTablet.cs
- ImageClickEventArgs.cs
- TaskDesigner.cs
- OracleInfoMessageEventArgs.cs
- HandleExceptionArgs.cs
- WebPartCloseVerb.cs
- ScriptControlDescriptor.cs
- TdsParameterSetter.cs
- ClientProxyGenerator.cs
- DataGridViewSortCompareEventArgs.cs
- DataSourceHelper.cs
- TextureBrush.cs
- ComEventsMethod.cs
- FixedLineResult.cs
- ContentFilePart.cs
- Group.cs
- UpdateEventArgs.cs
- XmlUtil.cs
- FileClassifier.cs
- ImageCodecInfoPrivate.cs
- ClientTargetCollection.cs
- EndpointInstanceProvider.cs
- WindowsGraphics.cs
- TrustManagerPromptUI.cs
- NamespaceQuery.cs
- ToolStripManager.cs