Beispiel #1
0
        private void Execute(string source)
        {
            var refAssemblies = DTE.Debugger.GetResolver().ReferencedAssemblies;
            var localMembers  = LocalReachableMembers.ToList();

            Injector injector = new Injector(DTE.Debugger, source, refAssemblies, localMembers);

            injector.Results += new EventHandler <Injector.ResultEventArgs>(injector_Results);
            injector.Execute();
        }
Beispiel #2
0
        private Type GetContextType()
        {
            CurrentType = DTE.Debugger.GetCurrentType();

            var resolver = DTE.Debugger.GetResolver();

            resolver.VsApplication = DTE;
            resolver.ReferencedAssemblies.ToList();

            Compiler compiler = new Compiler("", resolver.ReferencedAssemblies, LocalReachableMembers.ToList(), LocalsMode.PrivateClassFields);

            compiler.Compile();

            return(compiler.InjectorType);
        }