Example #1
0
        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);
        }
Example #2
0
        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;
                }
            }
        }