Exemple #1
0
            public Test()
            {
                _sharedState = new SharedVerifierState(this, DefaultFileExt);

                SolutionTransforms.Add((solution, projectId) =>
                {
                    var parseOptions = (VisualBasicParseOptions)solution.GetProject(projectId) !.ParseOptions !;
                    solution         = solution.WithProjectParseOptions(projectId, parseOptions.WithLanguageVersion(LanguageVersion));

                    return(solution);
                });
            }
            public Test()
            {
                _sharedState = new SharedVerifierState(this, DefaultFileExt);

                SolutionTransforms.Add((solution, projectId) =>
                {
                    var parseOptions = (CSharpParseOptions)solution.GetProject(projectId) !.ParseOptions !;
                    solution         = solution.WithProjectParseOptions(projectId, parseOptions.WithLanguageVersion(LanguageVersion));

                    var compilationOptions = solution.GetProject(projectId) !.CompilationOptions !;
                    compilationOptions     = compilationOptions.WithSpecificDiagnosticOptions(compilationOptions.SpecificDiagnosticOptions.SetItems(CSharpVerifierHelper.NullableWarnings));
                    solution = solution.WithProjectCompilationOptions(projectId, compilationOptions);

                    return(solution);
                });
            }