Esempio n. 1
0
 public Starship BuildStarshipFromApi(StarWarsAPI.Model.Starship starshipFromApi)
 {
     _starship = new Starship(
         name: starshipFromApi.name,
         mglt: starshipFromApi.MGLT.ToInt(),
         consumables: Parser.ParseConsumables(starshipFromApi.consumables));
     return(_starship);
 }
Esempio n. 2
0
 public Models.Starship GetStarship(StarWarsAPI.Model.Starship starship)
 {
     return(starship == null ? null : new Models.Starship
     {
         Name = starship.name,
         Consumables = parser.ParseDuration(starship.consumables),
         MGLT = parser.ParseInt(starship.MGLT),
     });
 }
Esempio n. 3
0
 public Starship GetStarship(StarWarsAPI.Model.Starship starship)
 {
     return(starship == null ? null : new Starship
     {
         Id = Guid.NewGuid(),
         Name = starship.name,
         Model = starship.model,
         Manufacturer = starship.manufacturer,
         MGLT = parser.ParseInt(starship.MGLT),
         Consumables = parser.ParseDuration(starship.consumables),
         Url = starship.url
     });
 }