public static StreamWriter GetThreadDebugInfoStream() { ThreadDebugInfo tdi = null; bool hasIt = g_ThreadDebugInfos.TryGetValue(Thread.CurrentThread.ManagedThreadId, out tdi); if (!hasIt) { SetThreadDebugInfo(GetThreadDebugInfoFileName()); } hasIt = g_ThreadDebugInfos.TryGetValue(Thread.CurrentThread.ManagedThreadId, out tdi); if (hasIt) { if (tdi.m_Enabled) { return(tdi.m_DebugInfo); } } return(null); }
public static void EnableDebugInfo(bool value) { ThreadDebugInfo tdi = null; bool hasIt = g_ThreadDebugInfos.TryGetValue(Thread.CurrentThread.ManagedThreadId, out tdi); if (hasIt) { tdi.m_Enabled = value; } else { SetThreadDebugInfo(GetThreadDebugInfoFileName()); hasIt = g_ThreadDebugInfos.TryGetValue(Thread.CurrentThread.ManagedThreadId, out tdi); if (hasIt) { tdi.m_Enabled = value; } } }