예제 #1
0
파일: Count.cs 프로젝트: ayende/Macto
        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));
        }
예제 #2
0
 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();
        }
예제 #4
0
파일: Count.cs 프로젝트: ayende/Macto
 public void ReportExternalCount(Location location, Officer officerInCharge, Inmate[] inmates)
 {
     ExternalCountLocationReports.Add(new ExternalCountLocationReport(location, officerInCharge, inmates));
 }