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
- WebAdminConfigurationHelper.cs
- CloseCryptoHandleRequest.cs
- HwndStylusInputProvider.cs
- ValidatorCompatibilityHelper.cs
- MetadataUtil.cs
- TemplateAction.cs
- AnnotationResource.cs
- LinqDataSourceDeleteEventArgs.cs
- ModelTreeEnumerator.cs
- InitiatorServiceModelSecurityTokenRequirement.cs
- SessionEndingEventArgs.cs
- ping.cs
- FlowLayoutSettings.cs
- BeginStoryboard.cs
- ObjectHelper.cs
- UIElement.cs
- Win32SafeHandles.cs
- ThreadAbortException.cs
- SecurityManager.cs
- CookieHandler.cs
- InsufficientMemoryException.cs
- ItemContainerGenerator.cs
- SQLByte.cs
- AppearanceEditorPart.cs
- TextServicesManager.cs
- BitmapEffectRenderDataResource.cs
- UnmanagedHandle.cs
- EdmPropertyAttribute.cs
- DbParameterCollectionHelper.cs
- MatrixTransform3D.cs
- PageCache.cs
- SystemNetworkInterface.cs
- IsolatedStorageFile.cs
- DesignUtil.cs
- IBuiltInEvidence.cs
- XmlHierarchicalEnumerable.cs
- FillBehavior.cs
- GroupQuery.cs
- RuleSettingsCollection.cs
- EntityClassGenerator.cs
- ServiceReference.cs
- XmlDataDocument.cs
- CqlIdentifiers.cs
- DataTemplateKey.cs
- EntityConnection.cs
- UpDownEvent.cs
- ViewStateModeByIdAttribute.cs
- ToolBar.cs
- HttpRequest.cs
- SafeTokenHandle.cs
- BaseDataBoundControlDesigner.cs
- XomlDesignerLoader.cs
- UserValidatedEventArgs.cs
- ThrowHelper.cs
- DocumentEventArgs.cs
- ECDsa.cs
- NamedPipeProcessProtocolHandler.cs
- ColorContext.cs
- ChainOfResponsibility.cs
- XmlCDATASection.cs
- PasswordPropertyTextAttribute.cs
- QueryParameter.cs
- SystemBrushes.cs
- UriTemplateMatch.cs
- MissingMethodException.cs
- StorageModelBuildProvider.cs
- EditModeSwitchButton.cs
- FontDifferentiator.cs
- GlobalProxySelection.cs
- ResourceType.cs
- RandomNumberGenerator.cs
- SerializerProvider.cs
- Brush.cs
- Query.cs
- TextEvent.cs
- TemplateLookupAction.cs
- BamlTreeNode.cs
- InputProviderSite.cs
- XamlRtfConverter.cs
- OrderedDictionary.cs
- SimpleColumnProvider.cs
- SafePointer.cs
- AnnotationAdorner.cs
- CommandLineParser.cs
- Comparer.cs
- XmlSchemaGroup.cs
- SourceFilter.cs
- WebConfigurationFileMap.cs
- PassportIdentity.cs
- DataGridViewCellValueEventArgs.cs
- MaskedTextProvider.cs
- XmlNodeChangedEventManager.cs
- StorageSetMapping.cs
- EntryIndex.cs
- WebExceptionStatus.cs
- RegexCharClass.cs
- GestureRecognitionResult.cs
- QueryCacheManager.cs
- ScriptResourceInfo.cs
- SerializationTrace.cs