Exemplo n.º 1
0
        public IMetadataProjectReference CompileProject(
            CompilationProjectContext projectContext,
            Func <LibraryExport> referenceResolver,
            Func <IList <ResourceDescriptor> > resourcesResolver)
        {
            // The target framework and configuration are assumed to be correct
            // in the design time process
            var task = _compiler.Compile(projectContext.ProjectDirectory, projectContext.Target);

            return(new DesignTimeProjectReference(projectContext, task.Result));
        }
        public IMetadataProjectReference GetProjectReference(
            Project project,
            ILibraryKey target,
            Func <ILibraryExport> referenceResolver)
        {
            // The target framework and configuration are assumed to be correct
            // in the design time process
            var task = _compiler.Compile(project.ProjectDirectory, target);

            return(new DesignTimeProjectReference(project, task.Result));
        }
Exemplo n.º 3
0
        public IMetadataProjectReference GetProjectReference(
            Project project,
            ILibraryKey target,
            Func <ILibraryExport> referenceResolver,
            IList <IMetadataReference> outgoingReferences)
        {
            // The target framework and configuration are assumed to be correct
            // in the design time process
            var task = _compiler.Compile(project.ProjectDirectory, target);

            foreach (var embeddedReference in task.Result.EmbeddedReferences)
            {
                outgoingReferences.Add(new EmbeddedMetadataReference(embeddedReference.Key, embeddedReference.Value));
            }

            return(new DesignTimeProjectReference(project, task.Result));
        }