コード例 #1
0
 public Models.Session MapSession(Json.TrackState json)
 {
     return(new Models.Session
     {
         Type = json.session,
         Duration = json.endET,
         CurrentTime = json.currentET
     });
 }
コード例 #2
0
        public void MapTrack(Models.Track track, Json.TrackState json)
        {
            if (track == null)
            {
                throw new ArgumentNullException("track", "Track should not be null in a mapper method.");
            }

            track.Name        = json.trackName;
            track.Distance    = json.lapDist;
            track.Phase       = json.gamePhase;
            track.SectorFlags = json.sectorFlags != null?json.sectorFlags.ToString() : string.Empty;

            track.Session = MapSession(json);
        }