public ProjectInformationResponse CurrentProject(Request request)
        {
            var document = _workspace.GetDocument(request.FileName);

            var msBuildContextProject = _msbuildContext?.GetProject(document?.Project.FilePath);
            var aspNet5ContextProject = _aspnet5Context?.GetProject(document?.Project.FilePath);

            MSBuildProject msBuildProjectItem = null;
            AspNet5Project aspNet5ProjectItem = null;

            if (msBuildContextProject != null)
            {
                msBuildProjectItem = new MSBuildProject(msBuildContextProject);
            }
            if (aspNet5ContextProject != null)
            {
                aspNet5ProjectItem = new AspNet5Project(aspNet5ContextProject);
            }

            return new ProjectInformationResponse
            {
                MsBuildProject = msBuildProjectItem,
                AspNet5Project = aspNet5ProjectItem
            };
        }
 public void Update(AspNet5Project project)
 {
     this.project = project;
 }
 public void OnProjectChanged(AspNet5Project project)
 {
     DispatchService.GuiDispatch (() => UpdateProject (project));
 }
        void UpdateProject(AspNet5Project project)
        {
            Solution solution = IdeApp.ProjectOperations.CurrentSelectedSolution;
            if (solution == null)
                return;

            DnxProject matchedProject = solution.FindProjectByProjectJsonFileName (project.Path);
            if (matchedProject != null) {
                matchedProject.Update (project);
            } else {
                LoggingService.LogWarning (String.Format("Unable to find project by json file. '{0}'", project.Path));
            }
        }