public Task <Cake> Bake(CakeStyle style)
 {
     return(Task.FromResult(new Cake
     {
         Style = style,
         IsFresh = true
     }));
 }
Exemple #2
0
        public async Task <Cake> Bake(CakeStyle style)
        {
            if (style == CakeStyle.ChocolateFudge)
            {
                return(await FrozenFudgeCake());
            }

            var freshClient = _httpClientFactory.CreateClient("fresh");

            return(await GetCakeCore(style.ToString(), freshClient));
        }