public void AddTranslationForAllIngredients()
{
log.InfoFormat("[AddTranslationForAllIngredients].");
try
{
List<Ingredient> list = serviceLayer.GetAllIngredients();
foreach (Ingredient tempIngr in list)
{
AddTranslationForIngredient(tempIngr);
//string text = (tempIngr.LongDesc != null && tempIngr.LongDesc.GetDescription() != null) ? tempIngr.LongDesc.GetDescription() : "";
//log.InfoFormat("[AddTranslationForAllIngredients] Ingredient.LongDescription={0}, translation={1}", text, tempIngr.LongDesc.GetDescription("he"));
}
log.InfoFormat("[AddTranslationForAllIngredients] Total characters count={0}, Total Ingredient Translated={1}, LongDescCount={2}, ComNameCount={3}.", charsCount, IngredientCount, LongDescCount, ComNameCount);
Console.Write("Total characters count = {0}.\n", charsCount);
}
catch (Exception e)
{
log.ErrorFormat("[AddTranslationForAllIngredients] Exception={0}, Total characters count={1}, Total Ingredient Translated={2}, LongDescCount={3}, ComNameCount={4}.", e, charsCount, IngredientCount, LongDescCount, ComNameCount);
Console.Write("[AddTranslationForAllIngredients] Exception={0}.\n", e);
}
}