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
-
Expand
EnvironmentBlock
-
Expand
EventTypeFilter
-
Expand
FilterElement
-
Expand
fred
-
Expand
InitState
-
Expand
ListenerElement
-
Expand
ListenerElementsCollection
-
Expand
Log
-
AddLogSwitch(LogSwitch)
-
AddOnLogMessage(LogMessageEventHandler)
-
AddOnLogSwitchLevel(LogSwitchLevelHandler)
-
AddStream(Stream)
-
Error(LogSwitch, string)
-
Error(string)
-
Error(string, string)
-
InvokeLogSwitchLevelHandlers(LogSwitch, LoggingLevels)
-
IsConsoleEnabled()
-
Log()
-
LogMessage(LoggingLevels, LogSwitch, string)
-
LogMessage(LoggingLevels, string)
-
ModifyLogSwitch(int, string, string)
-
Panic(string)
-
RemoveOnLogMessage(LogMessageEventHandler)
-
RemoveOnLogSwitchLevel(LogSwitchLevelHandler)
-
Status(LogSwitch, string)
-
Status(string)
-
Status(string, string)
-
Trace(LogSwitch, string)
-
Trace(string)
-
Trace(string, string)
-
Warning(LogSwitch, string)
-
Warning(string)
-
Warning(string, string)
-
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
- namespace System.Diagnostics
- {
- using System.Runtime.Remoting;
- using System;
- using System.Security.Permissions;
- using System.IO;
- using System.Collections;
- using System.Runtime.CompilerServices;
- using Encoding = System.Text.Encoding;
- using System.Runtime.Versioning;
-
-
-
-
-
-
-
-
- [Serializable()]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
- internal delegate void LogMessageEventHandler(LoggingLevels level, LogSwitch category, string message, StackTrace location);
-
-
-
-
-
-
- [Serializable()]
- internal delegate void LogSwitchLevelHandler(LogSwitch ls, LoggingLevels newLevel);
-
-
- static internal class Log
- {
-
-
-
-
-
-
-
-
-
-
- static internal Hashtable m_Hashtable;
- private static bool m_fConsoleDeviceEnabled;
- private static Stream[] m_rgStream;
- private static int m_iNumOfStreamDevices;
- private static int m_iStreamArraySize;
-
- static internal int iNumOfSwitches;
-
-
- private static LogMessageEventHandler _LogMessageEventHandler;
- private static LogSwitchLevelHandler _LogSwitchLevelHandler;
- private static object locker;
-
-
- public static readonly LogSwitch GlobalSwitch;
-
-
- static Log()
- {
- m_Hashtable = new Hashtable();
- m_fConsoleDeviceEnabled = false;
- m_rgStream = null;
- m_iNumOfStreamDevices = 0;
- m_iStreamArraySize = 0;
-
-
-
- locker = new object();
-
-
- GlobalSwitch = new LogSwitch("Global", "Global Switch for this log");
-
- GlobalSwitch.MinimumLevel = LoggingLevels.ErrorLevel;
- }
-
- public static void AddOnLogMessage(LogMessageEventHandler handler)
- {
- lock (locker)
- _LogMessageEventHandler = (LogMessageEventHandler)MulticastDelegate.Combine(_LogMessageEventHandler, handler);
- }
-
- public static void RemoveOnLogMessage(LogMessageEventHandler handler)
- {
-
- lock (locker)
- _LogMessageEventHandler = (LogMessageEventHandler)MulticastDelegate.Remove(_LogMessageEventHandler, handler);
- }
-
- public static void AddOnLogSwitchLevel(LogSwitchLevelHandler handler)
- {
- lock (locker)
- _LogSwitchLevelHandler = (LogSwitchLevelHandler)MulticastDelegate.Combine(_LogSwitchLevelHandler, handler);
- }
-
- public static void RemoveOnLogSwitchLevel(LogSwitchLevelHandler handler)
- {
- lock (locker)
- _LogSwitchLevelHandler = (LogSwitchLevelHandler)MulticastDelegate.Remove(_LogSwitchLevelHandler, handler);
- }
-
- static internal void InvokeLogSwitchLevelHandlers(LogSwitch ls, LoggingLevels newLevel)
- {
- LogSwitchLevelHandler handler = _LogSwitchLevelHandler;
- if (handler != null)
- handler(ls, newLevel);
- }
-
-
-
-
-
-
-
- public static bool IsConsoleEnabled {
- get { return m_fConsoleDeviceEnabled; }
- set { m_fConsoleDeviceEnabled = value; }
- }
-
-
-
-
-
- public static void AddStream(Stream stream)
- {
- if (stream == null)
- throw new ArgumentNullException("stream");
- if (m_iStreamArraySize <= m_iNumOfStreamDevices) {
-
- Stream[] newArray = new Stream[m_iStreamArraySize + 4];
-
-
- if (m_iNumOfStreamDevices > 0)
- Array.Copy(m_rgStream, newArray, m_iNumOfStreamDevices);
-
- m_iStreamArraySize += 4;
-
- m_rgStream = newArray;
- }
-
- m_rgStream[m_iNumOfStreamDevices++] = stream;
- }
-
-
-
-
-
-
- public static void LogMessage(LoggingLevels level, string message)
- {
- LogMessage(level, GlobalSwitch, message);
- }
-
-
-
-
-
- [ResourceExposure(ResourceScope.None)]
- [ResourceConsumption(ResourceScope.Process, ResourceScope.Process)]
- public static void LogMessage(LoggingLevels level, LogSwitch logswitch, string message)
- {
- if (logswitch == null)
- throw new ArgumentNullException("LogSwitch");
-
- if (level < 0)
- throw new ArgumentOutOfRangeException("level", Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum"));
-
-
- if (logswitch.CheckLevel(level) == true) {
-
-
-
- Debugger.Log((int)level, logswitch.strName, message);
-
-
- if (m_fConsoleDeviceEnabled) {
- Console.Write(message);
- }
-
-
- for (int i = 0; i < m_iNumOfStreamDevices; i++) {
- StreamWriter sw = new StreamWriter(m_rgStream[i]);
- sw.Write(message);
- sw.Flush();
- }
- }
- }
-
-
- public static void Trace(LogSwitch logswitch, string message)
- {
- LogMessage(LoggingLevels.TraceLevel0, logswitch, message);
- }
-
- public static void Trace(string switchname, string message)
- {
- LogSwitch ls;
- ls = LogSwitch.GetSwitch(switchname);
- LogMessage(LoggingLevels.TraceLevel0, ls, message);
- }
-
- public static void Trace(string message)
- {
- LogMessage(LoggingLevels.TraceLevel0, GlobalSwitch, message);
- }
-
- public static void Status(LogSwitch logswitch, string message)
- {
- LogMessage(LoggingLevels.StatusLevel0, logswitch, message);
- }
-
- public static void Status(string switchname, string message)
- {
- LogSwitch ls;
- ls = LogSwitch.GetSwitch(switchname);
- LogMessage(LoggingLevels.StatusLevel0, ls, message);
- }
-
- public static void Status(string message)
- {
- LogMessage(LoggingLevels.StatusLevel0, GlobalSwitch, message);
- }
-
- public static void Warning(LogSwitch logswitch, string message)
- {
- LogMessage(LoggingLevels.WarningLevel, logswitch, message);
- }
-
- public static void Warning(string switchname, string message)
- {
- LogSwitch ls;
- ls = LogSwitch.GetSwitch(switchname);
- LogMessage(LoggingLevels.WarningLevel, ls, message);
- }
-
- public static void Warning(string message)
- {
- LogMessage(LoggingLevels.WarningLevel, GlobalSwitch, message);
- }
-
- public static void Error(LogSwitch logswitch, string message)
- {
- LogMessage(LoggingLevels.ErrorLevel, logswitch, message);
- }
-
- public static void Error(string switchname, string message)
- {
- LogSwitch ls;
- ls = LogSwitch.GetSwitch(switchname);
- LogMessage(LoggingLevels.ErrorLevel, ls, message);
-
- }
-
- public static void Error(string message)
- {
- LogMessage(LoggingLevels.ErrorLevel, GlobalSwitch, message);
- }
-
- public static void Panic(string message)
- {
- LogMessage(LoggingLevels.PanicLevel, GlobalSwitch, message);
- }
-
-
-
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- static internal extern void AddLogSwitch(LogSwitch logSwitch);
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- static internal extern void ModifyLogSwitch(int iNewLevel, string strSwitchName, string strParentName);
- }
-
- }