private static ProjectData SetResourceInitials(ProjectData project, ResourceId id, string value) { project = project.SetRaw(ResourceFields.Initials, id, value); // Update Task.ResourceInitials foreach (var taskId in project.GetTasks(id)) { project = project.Reset(TaskFields.ResourceInitials, taskId); } return(project); }
private static ProjectData SetResourceName(ProjectData project, ResourceId id, string value) { project = project.SetRaw(ResourceFields.Name, id, value); // Update Assignment.ResourceName foreach (var assignmentId in project.GetAssignments(id)) { project = project.SetRaw(AssignmentFields.ResourceName, assignmentId, value); } // Update Task.ResourceNames foreach (var taskId in project.GetTasks(id)) { project = project.Reset(TaskFields.ResourceNames, taskId); } return(project); }