示例#1
0
        public static void ClassInitialize(TestContext testContext)
        {
            MessageFilter.Register();
            Type   type = System.Type.GetTypeFromProgID("VisualStudio.DTE.15.0");
            object inst = System.Activator.CreateInstance(type, true);

            dte = (EnvDTE80.DTE2)inst;
            dte.Solution.Open(Path.GetFullPath(@"../../artifacts/tsconfig/Tsconfig.sln"));
            solution = dte.Solution;

            settings = new MockSettings()
            {
                UseTsConfig = true
            };
            WebLinterVsix.WebLinterPackage.Settings = settings;
            WebLinterVsix.WebLinterPackage.Dte      = dte;
        }
示例#2
0
        protected void Initialize(string solutionPath)
        {
            MessageFilter.Register();
            Type   type = Type.GetTypeFromProgID("VisualStudio.DTE.15.0");
            object inst = Activator.CreateInstance(type, true);

            dte = (EnvDTE80.DTE2)inst;
            var test = (EnvDTE.DTE)inst;

            //test.
            dte.Solution.Open(Path.GetFullPath(solutionPath));

            solution = dte.Solution;
            settings = new MockSettings()
            {
                UseTsConfig = false
            };
            WebLinterPackage.Settings = settings;
            WebLinterPackage.Dte      = dte;
        }