Exemple #1
0
        private static void LogMessageAboutActiveTasks(TestContext context, TaskContainer container, string messagePrefix)
        {
            IList <Task> activeTasks = container.GetActiveTasks();

            if (activeTasks.Count == 0)
            {
                return;
            }

            var message = new StringBuilder(messagePrefix);

            for (int i = 0; i < activeTasks.Count; i++)
            {
                if (i != 0)
                {
                    message.Append(", ");
                }
                message.Append(activeTasks[i].Name);
            }

            context.LogWriter.Warnings.WriteLine(message.ToString());
        }