コード例 #1
0
        static void Main(string[] args)
        {
            _superheroService = new SuperheroService();

            Console.ForegroundColor = ConsoleColor.DarkGray;
            Console.WriteLine("\nAdding superheroes from seed data...\n");

            _superheroService.AddSuperheroesAysncFromSeedData().Wait();

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("\nListing Marvel superheroes and their superpowers:\n");
            ISuperhero superhero = SuperheroFactory.GetSuperhero(SuperheroUniverse.Marvel);

            ListSuperheroes(superhero.Superheroes);

            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("\nListing Dc superheroes and their superpowers:\n");
            superhero = SuperheroFactory.GetSuperhero(SuperheroUniverse.Dc);
            ListSuperheroes(superhero.Superheroes);

            Console.Read();
        }
コード例 #2
0
 public FetchSuperheroHandler(IStore aStore, ISuperheroService aSuperheroService) : base(aStore)
 {
     SuperheroService = aSuperheroService;
 }
コード例 #3
0
 public JsonImporter(ISuperheroService service)
 {
     this.service = service;
 }
コード例 #4
0
 public SuperheroController(ISuperheroService superheroService, IAppLogger <SuperheroController> logger)
 {
     this.superheroService = superheroService;
     this.logger           = logger;
 }