예제 #1
0
        public static bool TryGetFormForPrep(Preps preps, IngredientNode ing, bool remove, out IngredientForm form)
        {
            //TODO: Do we need to check all preps, or just the one that was on the input
            foreach (var prep in preps)
            {
                var fMatch = TryGetFormForIngredient(prep.Prep, ing.Id, out form);
                if (!fMatch)
                {
                    continue;
                }

                if (remove)
                {
                    preps.Remove(prep);
                }

                return(true);
            }

            form = null;
            return(false);
        }
예제 #2
0
 public IngredientNode(IngredientNode root, string synonym, string prepnote)
 {
     this.parent = root;
     this.IngredientName = synonym;
     this.PrepNote = prepnote;
 }
예제 #3
0
 public IngredientNode(IngredientNode root, string synonym, string prepnote)
 {
     this.parent    = root;
     IngredientName = synonym;
     PrepNote       = prepnote;
 }