/// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <string> > GetBreweriesCountriesAsync(this IBeerApi operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetBreweriesCountriesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='searchTerm'>
 /// </param>
 /// <param name='breweryId'>
 /// </param>
 /// <param name='categoryId'>
 /// </param>
 /// <param name='styleId'>
 /// </param>
 /// <param name='minAbv'>
 /// </param>
 /// <param name='maxAbv'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <Beer> > GetBeersAsync(this IBeerApi operations, IList <string> searchTerm = default(IList <string>), IList <int?> breweryId = default(IList <int?>), IList <int?> categoryId = default(IList <int?>), IList <int?> styleId = default(IList <int?>), double?minAbv = default(double?), double?maxAbv = default(double?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetBeersWithHttpMessagesAsync(searchTerm, breweryId, categoryId, styleId, minAbv, maxAbv, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Style> GetStyleByIdAsync(this IBeerApi operations, int id, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetStyleByIdWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='searchTerm'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <Category> > CategoriesGetAsync(this IBeerApi operations, IList <string> searchTerm = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CategoriesGetWithHttpMessagesAsync(searchTerm, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Beer> GetRandomBeerAsync(this IBeerApi operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetRandomBeerWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='searchTerm'>
 /// </param>
 /// <param name='categoryId'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <Style> > GetStylesAsync(this IBeerApi operations, IList <string> searchTerm = default(IList <string>), IList <int?> categoryId = default(IList <int?>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetStylesWithHttpMessagesAsync(searchTerm, categoryId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public RandomBeerDialog(IBeerApi beerService) : base(nameof(RandomBeerDialog))
 {
     _beerService = beerService;
     AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
     {
         OutputRandomBeerAsync
     }));
 }
Exemple #8
0
        public OrderBeerDialog(string id, IStatePropertyAccessor <UserInfo> userInfo, IBeerApi beerService) : base(id)
        {
            _userInfo    = userInfo;
            _beerService = beerService;

            AddDialog(new TextPrompt(Inputs.Text));
            AddDialog(new ChoicePrompt(Inputs.Choice));
            AddDialog(new ConfirmPrompt(Inputs.Confirm));

            AddMainDialog();
            AddGetExactBeerNameDialog();
        }
        public RecommendBeerByNameDialog(IBeerApi beerService)
            : base(nameof(RecommendBeerByNameDialog))
        {
            AddDialog(new BeerNamePrompt(nameof(BeerNamePrompt), beerService));

            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                PromptUser,
                SetResult
            }));

            InitialDialogId = nameof(WaterfallDialog);
        }
Exemple #10
0
        public RecommendBeerByCategoryDialog(IBeerApi beerService)
            : base(nameof(RecommendBeerByCategoryDialog))
        {
            _beerService = beerService;

            AddDialog(new ChoicePrompt(nameof(ChoicePrompt)));

            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                PromptForCategory,
                PromptForStyle,
                SetResult
            }));

            InitialDialogId = nameof(WaterfallDialog);
        }
        public RecommendBeerByOriginDialog(IBeerApi beerService)
            : base(nameof(RecommendBeerByOriginDialog))
        {
            _beerService = beerService;

            AddDialog(new ChoicePrompt(nameof(ChoicePrompt)));

            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                PromptForCountry,
                PromptForBrewery,
                SetResult
            }));

            InitialDialogId = nameof(WaterfallDialog);
        }
        public SearchBeerForOrderDialog(IBeerApi beerService)
            : base(nameof(SearchBeerForOrderDialog))
        {
            _beerService = beerService;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(new ChoicePrompt(nameof(ChoicePrompt)));

            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                PromptStep,
                ActStep,
                SetResult
            }));
            InitialDialogId = nameof(WaterfallDialog);
        }
 public static Task <IList <Brewery> > GetBreweriesByCountryAsync(this IBeerApi operations, string country, CancellationToken cancellationToken = default)
 {
     return(operations.GetBreweriesAsync(country: new[] { country }, cancellationToken: cancellationToken));
 }
 public static Task <IList <Beer> > GetBeersBySearchTermAsync(this IBeerApi operations, string searchTerm, CancellationToken cancellationToken = default)
 {
     return(operations.GetBeersAsync(searchTerm: new[] { searchTerm }, cancellationToken: cancellationToken));
 }
 public static Task <IList <Beer> > GetBeersByBreweryAsync(this IBeerApi operations, int?breweryId, CancellationToken cancellationToken = default)
 {
     return(operations.GetBeersAsync(breweryId: new[] { breweryId }, cancellationToken: cancellationToken));
 }
 public static Task <IList <Beer> > GetBeersByStyleAsync(this IBeerApi operations, int?styleId, CancellationToken cancellationToken = default)
 {
     return(operations.GetBeersAsync(styleId: new[] { styleId }, cancellationToken: cancellationToken));
 }
 public BeerNamePrompt(string dialogId, IBeerApi beerService)
     : base(dialogId)
 {
     _beerService = beerService;
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='searchTerm'>
 /// </param>
 /// <param name='categoryId'>
 /// </param>
 public static IList <Style> GetStyles(this IBeerApi operations, IList <string> searchTerm = default(IList <string>), IList <int?> categoryId = default(IList <int?>))
 {
     return(operations.GetStylesAsync(searchTerm, categoryId).GetAwaiter().GetResult());
 }
Exemple #19
0
 public BeerBot(BeerBotAccessors accessors, LuisRecognizer luisRecognizer, IBeerApi beerService, IImageSearchService imageSearch)
 {
     _beerDialogs    = new BeerDialogs(accessors.DialogState, accessors.UserInfo, beerService, imageSearch);
     _luisRecognizer = luisRecognizer;
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static Beer BeersRandomGet(this IBeerApi operations)
 {
     return(operations.BeersRandomGetAsync().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static Beer GetRandomBeer(this IBeerApi operations)
 {
     return(operations.GetRandomBeerAsync().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='searchTerm'>
 /// </param>
 /// <param name='country'>
 /// </param>
 public static IList <Brewery> GetBreweries(this IBeerApi operations, IList <string> searchTerm = default(IList <string>), IList <string> country = default(IList <string>))
 {
     return(operations.GetBreweriesAsync(searchTerm, country).GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <string> GetBreweriesCountries(this IBeerApi operations)
 {
     return(operations.GetBreweriesCountriesAsync().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='searchTerm'>
 /// </param>
 public static IList <Category> GetCategories(this IBeerApi operations, IList <string> searchTerm = default(IList <string>))
 {
     return(operations.GetCategoriesAsync(searchTerm).GetAwaiter().GetResult());
 }
 public static Task <IList <Style> > GetStylesByCategoryAsync(this IBeerApi operations, int?categoryId, CancellationToken cancellationToken = default)
 {
     return(operations.GetStylesAsync(categoryId: new[] { categoryId }, cancellationToken: cancellationToken));
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 public static Beer GetBeerById(this IBeerApi operations, int id)
 {
     return(operations.GetBeerByIdAsync(id).GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 public static Category CategoriesByIdGet(this IBeerApi operations, int id)
 {
     return(operations.CategoriesByIdGetAsync(id).GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 public static Style StylesByIdGet(this IBeerApi operations, int id)
 {
     return(operations.StylesByIdGetAsync(id).GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='searchTerm'>
 /// </param>
 /// <param name='breweryId'>
 /// </param>
 /// <param name='categoryId'>
 /// </param>
 /// <param name='styleId'>
 /// </param>
 /// <param name='minAbv'>
 /// </param>
 /// <param name='maxAbv'>
 /// </param>
 public static IList <Beer> GetBeers(this IBeerApi operations, IList <string> searchTerm = default(IList <string>), IList <int?> breweryId = default(IList <int?>), IList <int?> categoryId = default(IList <int?>), IList <int?> styleId = default(IList <int?>), double?minAbv = default(double?), double?maxAbv = default(double?))
 {
     return(operations.GetBeersAsync(searchTerm, breweryId, categoryId, styleId, minAbv, maxAbv).GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 public static Category GetCategoryById(this IBeerApi operations, int id)
 {
     return(operations.GetCategoryByIdAsync(id).GetAwaiter().GetResult());
 }