private static IOutputSpeech CreateSpeech(SkillTypen typ, List <SpeisePlan> items, DateTime tag, bool today) { var text = ""; if (items.Count > 0) { if (today) { text += $"{typ.ToDescription()}. "; } else { text += $"{typ.ToDescription()} {ToWochentag(tag)} den {tag.SayAsDateYear()}. "; } text += CreateEssensPlanSpeech(items); } else { text += FehlerTypen.NoSpeisePlan.ToDescription(); } return(new SsmlOutputSpeech { Ssml = $"<speak>{text}</speak>" }); }
private static IOutputSpeech CreateSpeech(SkillTypen typ, List <SpeisePlan> items, int kategorie, int kw) { var text = ""; if (items.Count > 0) { var i = 0; var missingDates = GetMissingDays(items); var menue = ((MenueKategorien)kategorie).ToDescription(); text += $"{typ.ToDescription()} {kw} für {menue} eingeplant. "; foreach (var item in items) { if (i == 0) { text += item.Beschreibung; } else if (i == items.Count - 1) { text += $", sowie {item.Beschreibung}. "; } else { text += $". {item.Beschreibung}"; } i++; } if (missingDates.Count > 0) { text += CreateMissingDatesSpeech(missingDates, menue); } } else { FehlerTypen.NoSpeisePlan.ToDescription(); } return(new SsmlOutputSpeech { Ssml = $"<speak>{text}</speak>" }); }