コード例 #1
0
 public static ProjectInfo CreateProjectInfo(this ProjectFileInfo projectFileInfo)
 {
     return(ProjectInfo.Create(
                id: projectFileInfo.Id,
                version: VersionStamp.Create(),
                name: projectFileInfo.Name,
                assemblyName: projectFileInfo.AssemblyName,
                language: LanguageNames.CSharp,
                filePath: projectFileInfo.FilePath,
                outputFilePath: projectFileInfo.TargetPath,
                compilationOptions: projectFileInfo.CreateCompilationOptions()));
 }
コード例 #2
0
        public static ProjectInfo CreateProjectInfo(this ProjectFileInfo projectFileInfo, IAnalyzerAssemblyLoader analyzerAssemblyLoader)
        {
            var analyzerReferences = ResolveAnalyzerReferencesForProject(projectFileInfo, analyzerAssemblyLoader);

            return(ProjectInfo.Create(
                       id: projectFileInfo.Id,
                       version: VersionStamp.Create(),
                       name: projectFileInfo.Name,
                       assemblyName: projectFileInfo.AssemblyName,
                       language: LanguageNames.CSharp,
                       filePath: projectFileInfo.FilePath,
                       outputFilePath: projectFileInfo.TargetPath,
                       compilationOptions: projectFileInfo.CreateCompilationOptions(),
                       analyzerReferences: analyzerReferences));
        }
コード例 #3
0
        public static CSharpCompilationOptions CreateCompilationOptions(this ProjectFileInfo projectFileInfo)
        {
            var compilationOptions = new CSharpCompilationOptions(projectFileInfo.OutputKind);

            return(projectFileInfo.CreateCompilationOptions(compilationOptions));
        }