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); }
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); }
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; }