예제 #1
0
            public void AddImports(ProjectId projectId, ImmutableArray <string> imports)
            {
                if (projectId == null)
                {
                    throw new ArgumentNullException(nameof(projectId));
                }

                var project            = CurrentSolution.GetProject(projectId);
                var compilationOptions = (CSharpCompilationOptions)project.CompilationOptions;

                SetCurrentSolution(
                    CurrentSolution.WithProjectCompilationOptions(
                        projectId,
                        compilationOptions.WithUsings(imports)));
            }