Exemplo n.º 1
0
 private static void PrefixStreamEventNode(StreamEventNode head)
 {
     head.ThreadId = Thread.CurrentThread.ManagedThreadId;
     while (true)
     {
         StreamEventNode n = root;
         head.Next = n;
         if (Interlocked.CompareExchange(ref root, head, n) == n)
         {
             return;
         }
     }
 }
Exemplo n.º 2
0
        public static string ConsumeTraceDescription()
        {
            StringBuilder   result = new StringBuilder();
            StreamEventNode n      = root;

            root = null;
            while (n != null)
            {
                result.AppendLine(
                    "object #" + n.InstanceId +
                    " was " + (n.IsCreation ? "created " : "disposed") +
                    " on thread #" + n.ThreadId + " at:\r\n" + n.StackTraceText);
                n = n.Next;
            }

            return(result.ToString());
        }
 private static void PrefixStreamEventNode(StreamEventNode head)
 {
     head.ThreadId = Thread.CurrentThread.ManagedThreadId;
     while (true)
     {
         StreamEventNode n = root;
         head.Next = n;
         if (Interlocked.CompareExchange(ref root, head, n) == n)
         {
             return;
         }
     }
 }
        public static string ConsumeTraceDescription()
        {
            StringBuilder result = new StringBuilder();
            StreamEventNode n = root;
            root = null;
            while (n != null)
            {
                result.AppendLine(
                    "object #" + n.InstanceId +
                    " was " + (n.IsCreation ? "created " : "disposed") +
                    " on thread #" + n.ThreadId + " at:\r\n" + n.StackTraceText);
                n = n.Next;
            }

            return result.ToString();
        }