示例#1
0
 public static DriverStats Mapper(int driverId, DriverCalculationInfo calcInfo)
 {
     return(new DriverStats
     {
         Id = driverId,
         TotalPoints = calcInfo.TotalPoints,
         TotalPointsOfCurrentSeason = calcInfo.TotalPointsOfCurrentSeason,
         HighestResult = calcInfo.HighestResult,
         TotalNumOfHighestResult = calcInfo.TotalNumOfHighestResult,
         BestTrack = calcInfo.BestTrack,
         NumRaceFastestLaps = calcInfo.NumRaceFastestLaps,
         NumOfRacesCompleted = calcInfo.NumOfRacesCompleted,
         NumDNFs = calcInfo.NumDNFs,
         TotalLapsComplete = calcInfo.TotalLapsComplete,
         BestSeason = calcInfo.BestSeason,
         NumChapionships = calcInfo.NumChapionships,
         TopTenFinishes = calcInfo.TopTenFinishes,
         NumOfRaceWins = calcInfo.NumOfRaceWins,
         NumOfLapsLead = calcInfo.LeadLaps,
         NumOfOvertakes = calcInfo.Overtakes
     });
 }
示例#2
0
 public static DriverInformation Mapper(MotorsportSite.DataLevel.Drivers.Models.Driver dataModel, DriverCalculationInfo calcInfo)
 {
     return(new DriverInformation
     {
         Id = dataModel.Id,
         CatagoryId = dataModel.CatagoryId,
         FirstName = dataModel.FirstName,
         LastName = dataModel.LastName,
         ShortName = dataModel.ShortName,
         DriverNumber = dataModel.DriverNumber,
         DOB = dataModel.DOB,
         Country = dataModel.Country,
         PlaceOfBirth = dataModel.PlaceOfBirth,
         TotalPoints = calcInfo.TotalPoints,
         TotalPointsOfCurrentSeason = calcInfo.TotalPointsOfCurrentSeason,
         HighestResult = calcInfo.HighestResult,
         TotalNumOfHighestResult = calcInfo.TotalNumOfHighestResult,
         BestTrack = calcInfo.BestTrack,
         NumRaceFastestLaps = calcInfo.NumRaceFastestLaps,
         NumOfRacesCompleted = calcInfo.NumOfRacesCompleted,
         NumDNFs = calcInfo.NumDNFs,
         TotalLapsComplete = calcInfo.TotalLapsComplete,
         BestSeason = calcInfo.BestSeason,
         NumChapionships = calcInfo.NumChapionships
     });
 }