CarbonFitness.Data.Model.UserIngredientExtensions.GetActualCalorieCount C# (CSharp) Method

GetActualCalorieCount() public static method

public static GetActualCalorieCount ( this userIngredient, decimal>.Func valueProperty ) : decimal
userIngredient this
valueProperty decimal>.Func
return decimal
        public static decimal GetActualCalorieCount(this UserIngredient userIngredient, Func<Ingredient, decimal> valueProperty)
        {
            return (userIngredient.Measure / userIngredient.Ingredient.WeightInG) * valueProperty.Invoke(userIngredient.Ingredient);
        }
UserIngredientExtensions