We need you! We're working hard on the next version of Developer Fusion -
Let us know what you think we should be up to!
-
Expand
Microsoft.Win32
-
Expand
Microsoft.Win32.SafeHandles
-
Expand
System
-
Expand
System.Runtime.Hosting
-
Expand
System.Runtime.InteropServices
-
Expand
System.Runtime.CompilerServices
-
Expand
System.Collections
-
Expand
System.Collections.Generic
-
Expand
System.Collections.ObjectModel
-
Expand
System.Configuration.Assemblies
-
Expand
System.Diagnostics
-
Expand
Assert
-
Expand
AssertFilter
-
Expand
AssertFilters
-
Expand
AssertSection
-
Expand
AssertWrapper
-
Expand
AsyncStreamReader
-
Expand
BooleanSwitch
-
Expand
ConditionalAttribute
-
Expand
ConsoleTraceListener
-
Expand
CorrelationManager
-
Expand
CounterSampleCalculator
-
Expand
DataReceivedEventArgs
-
Expand
Debug
-
Expand
DebuggableAttribute
-
Expand
Debugger
-
Expand
DebuggerBrowsableAttribute
-
Expand
DebuggerBrowsableState
-
Expand
DebuggerDisplayAttribute
-
Expand
DebuggerHiddenAttribute
-
Expand
DebuggerNonUserCodeAttribute
-
Expand
DebuggerStepperBoundaryAttribute
-
Expand
DebuggerStepThroughAttribute
-
Expand
DebuggerTypeProxyAttribute
-
Expand
DebuggerVisualizerAttribute
-
Expand
DebuggingModes
-
Expand
DefaultFilter
-
Expand
DefaultTraceListener
-
Expand
DelimitedListTraceListener
-
Expand
DiagnosticsConfiguration
-
Expand
DiagnosticsConfigurationHandler
-
Create(object, object, XmlNode)
-
HandleAssert(Hashtable, XmlNode, object)
-
HandleCounters(Hashtable, Hashtable, XmlNode, object)
-
HandleListeners(Hashtable, XmlNode, object)
-
HandleSwitches(Hashtable, XmlNode, object)
-
HandleTrace(Hashtable, XmlNode, object)
-
Expand
EnvironmentBlock
-
Expand
EventTypeFilter
-
Expand
FilterElement
-
Expand
fred
-
Expand
InitState
-
Expand
ListenerElement
-
Expand
ListenerElementsCollection
-
Expand
Log
-
Expand
LoggingLevels
-
Expand
LogSwitch
-
Expand
ModuleInfo
-
Expand
MonitoringDescriptionAttribute
-
Expand
OrdinalCaseInsensitiveComparer
-
Expand
PerfCounterSection
-
Expand
Process
-
Expand
ProcessInfo
-
Expand
ProcessPriorityClass
-
Expand
ProcessStartInfo
-
Expand
ProcessThreadTimes
-
Expand
ProcessWaitHandle
-
Expand
ProcessWindowStyle
-
Expand
SharedListenerElementsCollection
-
Expand
SourceElement
-
Expand
SourceElementsCollection
-
Expand
SourceFilter
-
Expand
SourceLevels
-
Expand
SourceSwitch
-
Expand
StackFrame
-
Expand
StackFrameHelper
-
Expand
StackTrace
-
Expand
State
-
Expand
Stopwatch
-
Expand
StreamReadMode
-
Expand
Switch
-
Expand
SwitchAttribute
-
Expand
SwitchElement
-
Expand
SwitchElementsCollection
-
Expand
SwitchesDictionarySectionHandler
-
Expand
SwitchLevelAttribute
-
Expand
SystemDiagnosticsSection
-
Expand
TextWriterTraceListener
-
Expand
ThreadInfo
-
Expand
Trace
-
Expand
TraceEventCache
-
Expand
TraceEventType
-
Expand
TraceFilter
-
Expand
TraceFormat
-
Expand
TraceInternal
-
Expand
TraceLevel
-
Expand
TraceListener
-
Expand
TraceListenerCollection
-
Expand
TraceOptions
-
Expand
TraceSection
-
Expand
TraceSource
-
Expand
TraceSwitch
-
Expand
TraceUtils
-
Expand
TypedElement
-
Expand
XmlWriterTraceListener
-
Expand
System.Diagnostics.CodeAnalysis
-
Expand
System.Diagnostics.SymbolStore
-
Expand
System.Globalization
-
Expand
System.IO
-
Expand
System.IO.IsolatedStorage
-
Expand
System.Reflection
-
Expand
System.Reflection.Cache
-
Expand
System.Reflection.Emit
-
Expand
System.Resources
-
Expand
System.Runtime
-
Expand
System.Runtime.InteropServices.Expando
-
Expand
System.Runtime.ConstrainedExecution
-
Expand
System.Runtime.Remoting.Activation
-
Expand
System.Runtime.Remoting.Messaging
-
Expand
System.Runtime.Remoting.Channels
-
Expand
System.Runtime.Remoting.Lifetime
-
Expand
System.Runtime.Remoting
-
Expand
System.Runtime.Remoting.Contexts
-
Expand
System.Runtime.Remoting.Proxies
-
Expand
System.Runtime.Remoting.Metadata
-
Expand
System.Runtime.Remoting.Metadata.W3cXsd2001
-
Expand
System.Runtime.Remoting.Services
-
Expand
System.Runtime.Serialization
-
Expand
System.Runtime.Serialization.Formatters
-
Expand
System.Runtime.Serialization.Formatters.Binary
-
Expand
System.Runtime.Versioning
-
Expand
System.Security
-
Expand
System.Security.Cryptography
-
Expand
System.Security.Cryptography.X509Certificates
-
Expand
System.Security.Permissions
-
Expand
System.Security.Policy
-
Expand
System.Security.Principal
-
Expand
System.Security.Util
-
Expand
System.Text
-
Expand
System.Threading
-
Expand
System.Runtime.Remoting.Channels.Http
-
Expand
System.Runtime.Remoting.Channels.Tcp
-
Expand
System.Runtime.Remoting.MetadataServices
-
Expand
System.Runtime.Serialization.Formatters.Soap.Xml
-
Expand
System.Runtime.Serialization.Formatters.Soap
-
Expand
Microsoft.Tools.Caspol
-
Expand
Microsoft.Tools.Build
-
Expand
Microsoft.CSharp
-
Expand
System.CodeDom
-
Expand
System.CodeDom.Compiler
-
Expand
System.Collections.Specialized
-
Expand
System.ComponentModel
-
Expand
System.ComponentModel.Design
-
Expand
System.ComponentModel.Design.Serialization
-
Expand
System.Configuration
-
Expand
System.Web
-
Expand
System.Configuration.Provider
-
Expand
System.Configuration.Internal
-
Expand
System.Internal
-
Expand
System.Windows.Forms
-
Expand
System.Net
-
Expand
System.Net.Sockets
-
Expand
System.Net.NetworkInformation
-
Expand
System.Net.ComImports
-
Expand
System.Net.Security
-
Expand
System.Net.Cache
-
Expand
System.Net.Configuration
-
Expand
System.Text.RegularExpressions
-
Expand
System.Tools
-
Expand
System.IO.Compression
-
Expand
System.IO.Ports
-
Expand
System.Security.AccessControl
-
Expand
System.Xml
-
Expand
System.Xml.XPath.DataBinding
-
Expand
System.Xml.Schema
-
Expand
System.Xml.Serialization
-
Expand
System.Xml.Serialization.Advanced
-
Expand
System.Xml.Serialization.Configuration
-
Expand
System.Xml.XPath
-
Expand
System.Xml.Xsl
-
Expand
System.Xml.Xsl.IlGen
-
Expand
System.Xml.Xsl.Qil
-
Expand
System.Xml.Xsl.Runtime
-
Expand
System.Xml.Xsl.XPath
-
Expand
System.Xml.Xsl.Xslt
-
Expand
System.Xml.Xsl.XsltOld
-
Expand
System.Xml.Xsl.XsltOld.Debugger
-
Expand
Microsoft.JScript
-
Expand
Microsoft.Vsa
-
Expand
Microsoft.JScript.Vsa
- #if !LIB
- #define TRACE
- #define DEBUG
- namespace System.Diagnostics
- {
-
- using System;
- using System.Collections;
- using System.Diagnostics;
- using System.Xml;
- using System.Configuration;
- using System.Reflection;
- using System.Globalization;
-
- /// <devdoc>
- /// The configuration section handler for the diagnostics section of the configuration
- /// file. The section handler participates in the resolution of configuration settings
- /// between the <diagnostics> and </diagnostics>portion of the .config file.
- /// </devdoc>
- /// <internalonly/>
- [Obsolete("This class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
- public class DiagnosticsConfigurationHandler : IConfigurationSectionHandler
- {
-
- /// <devdoc>
- /// <para>Parses the configuration settings between the
- /// <diagnostics> and </diagnostics> portion of the .config file to populate
- /// the values of 'WebServicesConfiguration' object and returning it.
- /// </para>
- /// </devdoc>
- /// <internalonly/>
- public virtual object Create(object parent, object configContext, XmlNode section)
- {
- bool foundSwitches = false;
- bool foundAssert = false;
- bool foundTrace = false;
- bool foundCounters = false;
-
- HandlerBase.CheckForUnrecognizedAttributes(section);
-
-
-
- Hashtable parentConfig = (Hashtable)parent;
- Hashtable config;
- if (parentConfig == null)
- config = new Hashtable();
- else
- config = (Hashtable)parentConfig.Clone();
-
- foreach (XmlNode child in section.ChildNodes) {
- if (HandlerBase.IsIgnorableAlsoCheckForNonElement(child))
- continue;
-
- switch (child.Name) {
- case "switches":
- if (foundSwitches)
- throw new ConfigurationErrorsException(SR.GetString(SR.ConfigSectionsUnique, "switches"));
- foundSwitches = true;
-
- HandleSwitches(config, child, configContext);
- break;
- case "assert":
- if (foundAssert)
- throw new ConfigurationErrorsException(SR.GetString(SR.ConfigSectionsUnique, "assert"));
- foundAssert = true;
-
- HandleAssert(config, child, configContext);
- break;
- case "trace":
- if (foundTrace)
- throw new ConfigurationErrorsException(SR.GetString(SR.ConfigSectionsUnique, "trace"));
- foundTrace = true;
-
- HandleTrace(config, child, configContext);
- break;
- case "performanceCounters":
- if (foundCounters)
- throw new ConfigurationErrorsException(SR.GetString(SR.ConfigSectionsUnique, "performanceCounters"));
- foundCounters = true;
-
- HandleCounters((Hashtable)parent, config, child, configContext);
- break;
- default:
- HandlerBase.ThrowUnrecognizedElement(child);
- break;
- }
-
- HandlerBase.CheckForUnrecognizedAttributes(child);
- }
- return config;
- }
-
- private static void HandleSwitches(Hashtable config, XmlNode switchesNode, object context)
- {
- Hashtable switches = (Hashtable)new SwitchesDictionarySectionHandler().Create(config["switches"], context, switchesNode);
- IDictionaryEnumerator en = switches.GetEnumerator();
- while (en.MoveNext()) {
- try {
- Int32.Parse((string)en.Value, CultureInfo.InvariantCulture);
- }
- catch {
- throw new ConfigurationErrorsException(SR.GetString(SR.Value_must_be_numeric, en.Key));
- }
- }
-
- config["switches"] = switches;
- }
-
- private static void HandleAssert(Hashtable config, XmlNode assertNode, object context)
- {
- bool assertuienabled = false;
- if (HandlerBase.GetAndRemoveBooleanAttribute(assertNode, "assertuienabled", ref assertuienabled) != null)
- config["assertuienabled"] = assertuienabled;
-
- string logfilename = null;
- if (HandlerBase.GetAndRemoveStringAttribute(assertNode, "logfilename", ref logfilename) != null)
- config["logfilename"] = logfilename;
-
- HandlerBase.CheckForChildNodes(assertNode);
- }
-
- private static void HandleCounters(Hashtable parent, Hashtable config, XmlNode countersNode, object context)
- {
- int filemappingsize = 0;
- if (HandlerBase.GetAndRemoveIntegerAttribute(countersNode, "filemappingsize", ref filemappingsize) != null) {
-
- if (parent == null)
- config["filemappingsize"] = filemappingsize;
- }
-
- HandlerBase.CheckForChildNodes(countersNode);
- }
-
- private static void HandleTrace(Hashtable config, XmlNode traceNode, object context)
- {
- bool foundListeners = false;
- bool autoflush = false;
- if (HandlerBase.GetAndRemoveBooleanAttribute(traceNode, "autoflush", ref autoflush) != null)
- config["autoflush"] = autoflush;
-
- int indentsize = 0;
- if (HandlerBase.GetAndRemoveIntegerAttribute(traceNode, "indentsize", ref indentsize) != null)
- config["indentsize"] = indentsize;
-
- foreach (XmlNode traceChild in traceNode.ChildNodes) {
- if (HandlerBase.IsIgnorableAlsoCheckForNonElement(traceChild))
- continue;
-
- if (traceChild.Name == "listeners") {
- if (foundListeners)
- throw new ConfigurationErrorsException(SR.GetString(SR.ConfigSectionsUnique, "listeners"));
- foundListeners = true;
-
- HandleListeners(config, traceChild, context);
- }
- else {
- HandlerBase.ThrowUnrecognizedElement(traceChild);
- }
- }
- }
-
- private static void HandleListeners(Hashtable config, XmlNode listenersNode, object context)
- {
- HandlerBase.CheckForUnrecognizedAttributes(listenersNode);
- foreach (XmlNode listenersChild in listenersNode.ChildNodes) {
- if (HandlerBase.IsIgnorableAlsoCheckForNonElement(listenersChild))
- continue;
-
- string name = null;
- string className = null;
- string initializeData = null;
- string op = listenersChild.Name;
-
- switch (op) {
- case "add":
- case "remove":
- case "clear":
- break;
- default:
- HandlerBase.ThrowUnrecognizedElement(listenersChild);
- break;
- }
-
- HandlerBase.GetAndRemoveStringAttribute(listenersChild, "name", ref name);
- HandlerBase.GetAndRemoveStringAttribute(listenersChild, "type", ref className);
- HandlerBase.GetAndRemoveStringAttribute(listenersChild, "initializeData", ref initializeData);
- HandlerBase.CheckForUnrecognizedAttributes(listenersChild);
- HandlerBase.CheckForChildNodes(listenersChild);
-
- TraceListener newListener = null;
- if (className != null) {
- Type t = Type.GetType(className);
-
- if (t == null)
- throw new ConfigurationErrorsException(SR.GetString(SR.Could_not_find_type, className));
-
- if (!typeof(TraceListener).IsAssignableFrom(t))
- throw new ConfigurationErrorsException(SR.GetString(SR.Type_isnt_tracelistener, className));
-
-
- if (initializeData == null) {
- ConstructorInfo ctorInfo = t.GetConstructor(new Type[] {});
- if (ctorInfo == null)
- throw new ConfigurationErrorsException(SR.GetString(SR.Could_not_get_constructor, className));
- newListener = (TraceListener)(ctorInfo.Invoke(new object[] {}));
- }
-
- else {
- ConstructorInfo ctorInfo = t.GetConstructor(new Type[] {typeof(string)});
- if (ctorInfo == null)
- throw new ConfigurationErrorsException(SR.GetString(SR.Could_not_get_constructor, className));
- newListener = (TraceListener)(ctorInfo.Invoke(new object[] {initializeData}));
- }
- if (name != null) {
- newListener.Name = name;
- }
- }
-
-
-
- switch (op[0]) {
- case 'a':
- if (newListener == null)
- throw new ConfigurationErrorsException(SR.GetString(SR.Could_not_create_listener, name));
-
- Trace.Listeners.Add(newListener);
-
- break;
- case 'r':
- if (newListener == null) {
-
-
-
- if (name == null)
- throw new ConfigurationErrorsException(SR.GetString(SR.Cannot_remove_with_null));
-
- Trace.Listeners.Remove(name);
- }
- else {
-
- Trace.Listeners.Remove(newListener);
- }
- break;
- case 'c':
- Trace.Listeners.Clear();
- break;
- default:
- HandlerBase.ThrowUnrecognizedElement(listenersChild);
- break;
- }
- }
- }
- }
-
- internal class SwitchesDictionarySectionHandler : DictionarySectionHandler
- {
- protected override string KeyAttributeName {
- get { return "name"; }
- }
-
- internal override bool ValueRequired {
- get { return true; }
- }
-
- }
- }
- #endif