示例#1
0
        public static async Task <RecipeViewModel> GetRecipeViewModelById(long id)
        {
            Recipe          recipe    = RecipeManager.GetRecipeById(id);
            RecipeViewModel viewModel = new RecipeViewModel(recipe);

            return(viewModel);
        }
        private static List <Models.Recipe> GetRecipeByName(string name)
        {
            List <Models.Recipe> recipes = new List <Recipe>();

            try
            {
                recipes = RecipeManager.GetAllByName(name);
            }
            catch (Exception ex)
            {
                return(null);
            }
            // DEMO: Tracepoints ($FUNCTION {response.Data.Count} matches), show parameter values in the Call Stack
            return(recipes);
        }
示例#3
0
        private static async Task <List <Models.Recipe> > GetRecipeByName(string name)
        {
            List <Models.Recipe> recipes = new List <Recipe>();

            try
            {
                recipes = RecipeManager.GetAllByName(name);
            }
            catch (Exception ex)
            {
                Global.Singleton.AI.TrackException(ex);
                return(null);
            }
            // DEMO: 03 - Tracepoints ($FUNCTION {response.Data.Count} matches), show parameter values in the Call Stack
            return(recipes);
        }
        private static List <Models.Recipe> GetRecipeByName(string name)
        {
            List <Models.Recipe> recipes = new List <Recipe>();

            try
            {
                recipes = RecipeManager.GetAllByName(name);

                // DEMO: Step Into Specific
                string title = GetFancyName(GetRandom(recipes).Title.ToUpper());
            }
            catch (Exception ex)
            {
                return(null);
            }
            return(recipes);
        }
示例#5
0
        private static async Task <List <Models.Recipe> > GetAllRecipes()
        {
            // DEMO: 01 - Run To
            List <Models.Recipe> recipes = new List <Recipe>();

            try
            {
                recipes = RecipeManager.GetAll();
            }
            catch (Exception ex)
            {
                Global.Singleton.AI.TrackException(ex);
                return(null);
            }
            // TODO: DEMO: 02 - Step Into Specific

            return(recipes);
        }
 private static List <Models.Recipe> GetAll(int NumberOfRecipes)
 {
     return(RecipeManager.GetAll(NumberOfRecipes));
 }
 private static List <Models.Recipe> GetAllRecipesByRating()
 {
     return(RecipeManager.GetAll());
 }