public string Execute(string[] inputArgs) { var heroType = inputArgs[0].ToLower(); var userName = inputArgs[1]; var hero = heroFactory.Create(heroType, userName); this.heroRepository.Add(hero); return($"Successfully created new {hero.GetType().Name}!"); }
public string Execute(string[] inputArgs) { string type = inputArgs[0]; string username = inputArgs[1]; var hero = heroFactory.Create(type, username); heroRepository.Add(hero); return($"Successfully created new {hero.GetType().Name}!"); }