Exemple #1
0
        private static void OnProcessExit(object sender, EventArgs e)
        {
            if (!Configuration.EnableObjectTracking)
            {
                return;
            }
            string str = ObjectTracker.ReportActiveObjects();

            if (string.IsNullOrEmpty(str))
            {
                return;
            }
            Console.WriteLine(str);
        }
Exemple #2
0
        public static string ReportActiveObjects()
        {
            StringBuilder stringBuilder = new StringBuilder();

            foreach (object obj in ObjectTracker.FindActiveObjects())
            {
                string str = obj.ToString();
                if (!string.IsNullOrEmpty(str))
                {
                    stringBuilder.AppendLine(str);
                }
            }
            return(((object)stringBuilder).ToString());
        }