public CSharpProject( ICSharpFileFactory cSharpFileFactory, MicrosoftBuildProject msBuildProject, string title) { Title = title; AssemblyName = msBuildProject.AssemblyName; FileName = msBuildProject.FileName; CompilerSettings = #region new CompilerSettings new CompilerSettings { AllowUnsafeBlocks = msBuildProject.AllowUnsafeBlocks, CheckForOverflow = msBuildProject.CheckForOverflowUnderflow, }; CompilerSettings.ConditionalSymbols.AddRange(msBuildProject.DefineConstants); #endregion ProjectContent = new CSharpProjectContent(); ProjectContent = ProjectContent.SetAssemblyName(msBuildProject.AssemblyName); ProjectContent = ProjectContent.SetProjectFileName(msBuildProject.FileName.FullPath); ProjectContent = ProjectContent.SetCompilerSettings(CompilerSettings); Files = msBuildProject.CompiledFileNames.Select( f => cSharpFileFactory.BuildCSharpFile(this, new FilePath(f))).ToList(); ProjectContent = ProjectContent.AddOrUpdateFiles( Files.Select(f => f.UnresolvedTypeSystemForFile)); ProjectContent = ProjectContent.AddAssemblyReferences(msBuildProject.ReferencedAssemblies); }
public CSharpProjectFactory(IMicrosoftBuildProjectAssemblyReferenceResolver assemblyReferenceResolver, ICSharpFileFactory cSharpFileFactory, IMicrosoftBuildProjectLoader microsoftBuildProjectLoader) { _assemblyReferenceResolver = assemblyReferenceResolver; _cSharpFileFactory = cSharpFileFactory; _microsoftBuildProjectLoader = microsoftBuildProjectLoader; }