Exemple #1
0
        void ProcessTest(OutputWindowPane pane)
        {
            string paneText;
            var    success = _threading.BeginInvokeAndWait("Reading pane", () => ReadTest(pane), out paneText, _unloading);

            if (!success)
            {
                return;
            }

            if (paneText == null || paneText.Length <= PluginManager.RESHARPER_TEST.Length)
            {
                return;
            }
            var methodName = paneText.Substring(PluginManager.RESHARPER_TEST.Length);

            pane.Clear();
            Debug.WriteLine("Running test " + methodName);
            var runner = new ResharperTests(pane, _threading, _actionManager, _saManager, _solution);
            var result = typeof(ResharperTests).GetMethod(methodName).Invoke(runner, new object[0]);

            var msg = string.Format("!ReSharper{0}:{1}\r\n", methodName, result);

            _output.Write(msg);
            pane.OutputString(msg);
        }
Exemple #2
0
        void ProcessTest(OutputWindowPane pane)
        {
            string paneText;
            var success = _threading.BeginInvokeAndWait("Reading pane",()=> ReadTest(pane), out paneText, _unloading);
            if (!success) return;

            if (paneText == null || paneText.Length <= PluginManager.RESHARPER_TEST.Length) return;
            var methodName = paneText.Substring(PluginManager.RESHARPER_TEST.Length);

            pane.Clear();
            Debug.WriteLine("Running test " + methodName);
            var runner = new ResharperTests(pane, _threading, _actionManager, _saManager, _solution);
            var result = typeof(ResharperTests).GetMethod(methodName).Invoke(runner, new object[0]);

            var msg = string.Format("!ReSharper{0}:{1}\r\n", methodName, result);
            _output.Write(msg);
            pane.OutputString(msg);
        }