private void ProcessProjectPlanDto(ProjectPlanDto projectPlanDto)
        {
            if (projectPlanDto == null)
            {
                throw new ArgumentNullException(nameof(projectPlanDto));
            }
            lock (m_Lock)
            {
                ResetProject();

                // Project Start Date.
                ProjectStartWithoutPublishing = projectPlanDto.ProjectStart;

                // Resources.
                ResourceSettingsDto = projectPlanDto.ResourceSettings;

                // Compilation.
                GraphCompilation = DtoConverter.FromDto(projectPlanDto.GraphCompilation);

                CyclomaticComplexity = projectPlanDto.GraphCompilation.CyclomaticComplexity;
                Duration             = projectPlanDto.GraphCompilation.Duration;

                // Activities.
                // Be sure to do this after the resources and project start date have been added.
                foreach (DependentActivityDto dependentActivityDto in projectPlanDto.DependentActivities)
                {
                    m_CoreViewModel.AddManagedActivity(DtoConverter.FromDto(dependentActivityDto));
                }

                m_CoreViewModel.UpdateActivitiesAllocatedToResources();

                m_CoreViewModel.SetCompilationOutput();

                m_CoreViewModel.CalculateCosts();

                // Arrow Graph.
                ArrowGraphSettingsDto = projectPlanDto.ArrowGraphSettings;
                ArrowGraphDto         = projectPlanDto.ArrowGraph;

                HasStaleOutputs = projectPlanDto.HasStaleOutputs;
            }

            PublishGraphCompilationUpdatedPayload();
            PublishArrowGraphDtoUpdatedPayload();
            //PublishGanttChartDtoUpdatedPayload();
        }
 private async Task SetCompilationOutputAsync()
 {
     await Task.Run(() => m_CoreViewModel.SetCompilationOutput());
 }
 private async Task SetCompilationOutputAsync()
 {
     await Task.Run(() => m_CoreViewModel.SetCompilationOutput()).ConfigureAwait(true);
 }