public void ReportInternalCount(Location location, Officer officerInCharge, int inmatesIn, int inmatesOut) { if (InternalCountLocationReports.Any(report => report.LocationId == location.Id)) throw new InvalidOperationException("Count already reported for this location"); InternalCountLocationReports.Add(new InternalCountLocationReport(location, officerInCharge, inmatesIn, inmatesOut)); }
public InternalCountLocationReport(Location location, Officer officerInCharge, int inmatesIn, int inmatesOut) { LocationId = location.Id; OfficerInChargeId = officerInCharge.Id; InmatesIn = inmatesIn; InmatesOut = inmatesOut; RosterCount = location.Roster.Count; }
public ExternalCountLocationReport(Location location, Officer officerInCharge, IEnumerable<Inmate> inmates) { InmateIds = new List<string>(); LocationId = location.Id; OfficerInChargeId = officerInCharge.Id; InmateIds = inmates.Select(inmate => inmate.Id).ToList(); }
public void ReportExternalCount(Location location, Officer officerInCharge, Inmate[] inmates) { ExternalCountLocationReports.Add(new ExternalCountLocationReport(location, officerInCharge, inmates)); }