String trace = Environment.GetEnvironmentVariable("MONO_TRACE_LISTENER");
#endif
+#if MOBILE
+ if (trace == null)
+ trace = ConsoleOutTrace;
+#endif
+
if (trace != null) {
string file = null;
string prefix = null;
namespace System.Diagnostics {
+#if !MOBILE
internal class TraceImplSettings {
public const string Key = ".__TraceInfoSettingsKey__.";
Listeners.Add (new DefaultTraceListener (), this);
}
}
+#endif
internal class TraceImpl {
+#if !MOBILE
private static object initLock = new object ();
+#endif
private static bool autoFlush;
{
}
+#if MOBILE
+ static TraceImpl ()
+ {
+ listeners = new TraceListenerCollection (true);
+ }
+#endif
+
public static bool AutoFlush {
get {
InitOnce ();
}
static bool use_global_lock;
-#if NET_2_0
+#if NET_2_0 && !MOBILE
static CorrelationManager correlation_manager = new CorrelationManager ();
public static CorrelationManager CorrelationManager {
// in the IDictionary returned).
private static void InitOnce ()
{
+#if !MOBILE
if (initLock != null) {
lock (initLock) {
if (listeners == null) {
}
initLock = null;
}
+#endif
}
// FIXME: According to MSDN, this method should display a dialog box
set { System.Threading.Thread.SetData (_attributesStore, value); }
}
+#if !MOBILE
private TraceFilter filter {
get { return (TraceFilter) System.Threading.Thread.GetData (_filterStore); }
set { System.Threading.Thread.SetData (_filterStore, value); }
}
+#endif
private TraceOptions options {
get {
#if NET_2_0
[ThreadStatic]
private StringDictionary attributes = new StringDictionary ();
+#if !MOBILE
[ThreadStatic]
private TraceFilter filter;
+#endif
[ThreadStatic]
private TraceOptions options;
#endif
return String.Join (joiner, arr);
}
+#if !MOBILE
[ComVisible (false)]
public virtual void TraceData (TraceEventCache eventCache, string source,
TraceEventType eventType, int id, object data)
{
TraceEvent (eventCache, source, TraceEventType.Transfer, id, String.Format ("{0}, relatedActivityId={1}", message, relatedActivityId));
}
+#endif
protected internal virtual string [] GetSupportedAttributes ()
{
get { return attributes; }
}
+#if !MOBILE
[ComVisibleAttribute (false)]
public TraceFilter Filter {
get { return filter; }
set { filter = value; }
}
+#endif
[ComVisibleAttribute (false)]
public TraceOptions TraceOutputOptions {
return listeners.Add (listener);
}
+#if !MOBILE
internal void Add (TraceListener listener, TraceImplSettings settings)
{
listener.IndentLevel = settings.IndentLevel;
listener.IndentSize = settings.IndentSize;
listeners.Add (listener);
}
+#endif
private void InitializeListener (TraceListener listener)
{
System.ComponentModel/Win32Exception.cs
System.Diagnostics/DataReceivedEventArgs.cs
System.Diagnostics/DataReceivedEventHandler.cs
-System.Diagnostics/Debug_2_1.cs
+System.Diagnostics/Debug.cs
+System.Diagnostics/DefaultTraceListener.cs
System.Diagnostics/FileVersionInfo.cs
System.Diagnostics/MonitoringDescriptionAttribute.cs
System.Diagnostics/Process.cs
System.Diagnostics/ProcessThreadCollection.cs
System.Diagnostics/ProcessWindowStyle.cs
System.Diagnostics/Stopwatch.cs
+System.Diagnostics/TraceImpl.cs
+System.Diagnostics/TraceListener.cs
+System.Diagnostics/TraceListenerCollection.cs
+System.Diagnostics/TraceOptions.cs
System.Diagnostics/ThreadPriorityLevel.cs
System.Diagnostics/ThreadState.cs
System.Diagnostics/ThreadWaitReason.cs