Beispiel #1
0
        private async Task <IResult <Func <Task> > > GetFirstChordsAnswer(string query, long chatId)
        {
            var link = await _chordsService.FindFirst(query);

            var chords = await link.Bind(x => _chordsService.Get(x));

            return(chords.Bind(x => SendChordsFn(x, chatId).Return()));
        }
Beispiel #2
0
        public async Task <string> Test(string query)
        {
            var link = await _chordsService.FindFirst(query);

            var chords = await link.Bind(x => _chordsService.Get(x));

            var result = chords.Bind(x => _chordsFormatter.Format(x).Return());

            return(result.ToString());
        }
 public Task <IResult <Chords> > Get(ChordsLink chordsLInk)
 {
     return(_decoratee.Get(chordsLInk));
 }