Exemplo n.º 1
0
        private ProjectInfo FixProjectInfo(ProjectInfo projectInfo)
        {
            if (projectInfo.CompilationOptions == null)
            {
                var compilationFactory = _languageServices.GetService <ICompilationFactoryService>();
                if (compilationFactory != null)
                {
                    projectInfo = projectInfo.WithCompilationOptions(
                        compilationFactory.GetDefaultCompilationOptions()
                        );
                }
            }

            if (projectInfo.ParseOptions == null)
            {
                var syntaxTreeFactory = _languageServices.GetService <ISyntaxTreeFactoryService>();
                if (syntaxTreeFactory != null)
                {
                    projectInfo = projectInfo.WithParseOptions(
                        syntaxTreeFactory.GetDefaultParseOptions()
                        );
                }
            }

            return(projectInfo);
        }
Exemplo n.º 2
0
        private ProjectInfo FixProjectInfo(ProjectInfo projectInfo)
        {
            if (projectInfo.CompilationOptions == null)
            {
                projectInfo = projectInfo.WithCompilationOptions(this.languageServices.GetService <ICompilationFactoryService>().GetDefaultCompilationOptions());
            }

            if (projectInfo.ParseOptions == null)
            {
                projectInfo = projectInfo.WithParseOptions(this.languageServices.GetService <ISyntaxTreeFactoryService>().GetDefaultParseOptions());
            }

            return(projectInfo);
        }
Exemplo n.º 3
0
        private ProjectInfo FixProjectInfo(ProjectInfo projectInfo)
        {
            if (projectInfo.CompilationOptions == null)
            {
                var compilationFactory = this.languageServices.GetService<ICompilationFactoryService>();
                if (compilationFactory != null)
                {
                    projectInfo = projectInfo.WithCompilationOptions(compilationFactory.GetDefaultCompilationOptions());
                }
            }

            if (projectInfo.ParseOptions == null)
            {
                var syntaxTreeFactory = this.languageServices.GetService<ISyntaxTreeFactoryService>();
                if (syntaxTreeFactory != null)
                {
                    projectInfo = projectInfo.WithParseOptions(syntaxTreeFactory.GetDefaultParseOptions());
                }
            }

            return projectInfo;
        }