/// <summary> /// Create a new instance of a ProjectAgencyResponse class, initializes with specified arguments. /// </summary> /// <param name="project"></param> /// <param name="agency"></param> /// <param name="response"></param> /// <param name="receivedOn"></param> public ProjectAgencyResponse(Project project, Agency agency, NotificationResponses response, DateTime?receivedOn = null) { this.ProjectId = project?.Id ?? throw new ArgumentNullException(nameof(project)); this.Project = project; this.AgencyId = agency?.Id ?? throw new ArgumentNullException(nameof(agency)); this.Agency = agency; this.Response = response; this.ReceivedOn = receivedOn ?? DateTime.UtcNow; }
/// <summary> /// Create a new instance of a ProjectAgencyResponse class, initializes with specified arguments. /// </summary> /// <param name="project"></param> /// <param name="agency"></param> /// <param name="notification"></param> /// <param name="response"></param> /// <param name="receivedOn"></param> public ProjectAgencyResponse(Project project, Agency agency, NotificationQueue notification, NotificationResponses response, DateTime?receivedOn = null) : this(project, agency, response, receivedOn) { this.NotificationId = notification?.Id ?? throw new ArgumentNullException(nameof(notification)); this.Notification = notification; }