public static bool TryGetFormForIngredient(string formname, Guid ing, out IngredientForm form) { form = null; FormNode node; if (false == synonymMap.TryGetValue(formname, out node)) { return(false); } var pair = new NameIngredientPair(formname, ing); return(pairings.TryGetValue(pair, out form)); }