Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically pass DTE object to "Ad hoc" test methods that take DTE as a parameter #17

Closed
jcansdale opened this issue Jul 22, 2016 · 0 comments
Assignees
Milestone

Comments

@jcansdale
Copy link
Owner

jcansdale commented Jul 22, 2016

NOTE: The 'Test With > In-Proc' command will pass the current DTE (Visual Studio) object to "Ad hoc" test methods that take DTE (or DTE2) as a parameter.

You can currently get this object using 'Test With > In-Proc' on a method like this:

            void go()
            {
                var dte = (DTE)AppDomain.CurrentDomain.GetData("DTE");
                Console.WriteLine("Hello, Visual Studio " + dte.Edition);
            }

It would be nice if you could do this instead:

            void go(DTE dte)
            {
                Console.WriteLine("Hello, Visual Studio " + dte.Edition);
            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant