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
- PropertyEmitterBase.cs
- XXXInfos.cs
- SchemaEntity.cs
- SizeLimitedCache.cs
- InitializerFacet.cs
- NavigationExpr.cs
- FontUnitConverter.cs
- ExpandableObjectConverter.cs
- SafeMILHandle.cs
- DecoderBestFitFallback.cs
- XmlSerializerAssemblyAttribute.cs
- Substitution.cs
- GridViewRow.cs
- AuthorizationSection.cs
- RelationshipEndMember.cs
- SmiMetaData.cs
- DesignTimeParseData.cs
- XmlNamespaceMapping.cs
- Label.cs
- CodeArrayCreateExpression.cs
- LightweightCodeGenerator.cs
- KeyEventArgs.cs
- SubclassTypeValidator.cs
- SelectionEditor.cs
- GridViewAutoFormat.cs
- TaiwanLunisolarCalendar.cs
- ConsumerConnectionPointCollection.cs
- ClientUtils.cs
- DirtyTextRange.cs
- PopOutPanel.cs
- TypeElement.cs
- ChannelTraceRecord.cs
- ThrowHelper.cs
- OdbcEnvironment.cs
- CryptoStream.cs
- TraceContext.cs
- OracleBFile.cs
- SchemaEntity.cs
- IPEndPointCollection.cs
- Evidence.cs
- Header.cs
- Vector3DAnimationBase.cs
- SingleObjectCollection.cs
- Version.cs
- Equal.cs
- EdmConstants.cs
- Substitution.cs
- RuntimeConfigLKG.cs
- BackgroundFormatInfo.cs
- WebPartConnectionsCancelVerb.cs
- Compiler.cs
- FilterElement.cs
- PrintPageEvent.cs
- SoapObjectInfo.cs
- PersonalizationStateInfoCollection.cs
- RecognitionEventArgs.cs
- EllipseGeometry.cs
- HttpCacheVaryByContentEncodings.cs
- UnsettableComboBox.cs
- SamlSubject.cs
- LocalizationParserHooks.cs
- Int32Collection.cs
- IListConverters.cs
- InputLanguageCollection.cs
- ListViewItemSelectionChangedEvent.cs
- SystemIPAddressInformation.cs
- TempFiles.cs
- XamlValidatingReader.cs
- ParallelRangeManager.cs
- DataGridViewSelectedCellCollection.cs
- GroupItem.cs
- DirectoryObjectSecurity.cs
- NativeMethods.cs
- MailMessageEventArgs.cs
- SignHashRequest.cs
- OdbcConnectionPoolProviderInfo.cs
- PenThreadWorker.cs
- DynamicObjectAccessor.cs
- DataTableReader.cs
- ProxyHelper.cs
- StringCollection.cs
- ObjectQuery_EntitySqlExtensions.cs
- CroppedBitmap.cs
- AnonymousIdentificationSection.cs
- UnmanagedMemoryStream.cs
- Tool.cs
- DesignerLoader.cs
- BindingObserver.cs
- HtmlTextArea.cs
- XmlTypeMapping.cs
- LineGeometry.cs
- StrokeNodeOperations.cs
- BitVector32.cs
- VisualBrush.cs
- SByteConverter.cs
- CacheChildrenQuery.cs
- RemoteCryptoTokenProvider.cs
- StorageScalarPropertyMapping.cs
- _NetworkingPerfCounters.cs
- MappingException.cs