C# Класс CarbonFitness.BusinessLogic.Implementation.UserIngredientBusinessLogic

Наследование: IUserIngredientBusinessLogic
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddUserIngredient ( User user, string ingredientName, int measure, System.DateTime dateTime ) : UserIngredient
DeleteUserIngredient ( User user, int userIngredientId, System.DateTime date ) : void
GetNutrientAverage ( IEnumerable nutrientEntities, User user ) : INutrientAverage
GetNutrientHistory ( NutrientEntity nutrientEntity, User user ) : ILine
GetNutrientSumForDate ( User user, NutrientEntity entity, System.DateTime date ) : decimal
GetNutrientSumList ( IEnumerable nutrients, User user ) : IEnumerable
GetUserIngredients ( User user, System.DateTime dateTime ) : CarbonFitness.Data.Model.UserIngredient[]
UserIngredientBusinessLogic ( IUserIngredientRepository userIngredientRepository, IIngredientRepository ingredientRepository, INutrientRepository nutrientRepository ) : System
getDatesfromuserIngredient ( UserIngredient userIngredients ) : IEnumerable
getNutrientIngredientSumForDate ( System.DateTime date, IEnumerable userIngredients, decimal>.Func valueToSum ) : decimal

Приватные методы

Метод Описание
Get100DaysUserIngredients ( User user ) : CarbonFitness.Data.Model.UserIngredient[]
GetExistingIngredient ( string ingredientName ) : Ingredient
GetValueSumPerDateFromUserIngredients ( IEnumerable userIngredients, decimal>.Func valueToSum ) : decimal>.Dictionary

Описание методов

AddUserIngredient() публичный Метод

public AddUserIngredient ( User user, string ingredientName, int measure, System.DateTime dateTime ) : UserIngredient
user CarbonFitness.Data.Model.User
ingredientName string
measure int
dateTime System.DateTime
Результат CarbonFitness.Data.Model.UserIngredient

DeleteUserIngredient() публичный Метод

public DeleteUserIngredient ( User user, int userIngredientId, System.DateTime date ) : void
user CarbonFitness.Data.Model.User
userIngredientId int
date System.DateTime
Результат void

GetNutrientAverage() публичный Метод

public GetNutrientAverage ( IEnumerable nutrientEntities, User user ) : INutrientAverage
nutrientEntities IEnumerable
user CarbonFitness.Data.Model.User
Результат INutrientAverage

GetNutrientHistory() публичный Метод

public GetNutrientHistory ( NutrientEntity nutrientEntity, User user ) : ILine
nutrientEntity NutrientEntity
user CarbonFitness.Data.Model.User
Результат ILine

GetNutrientSumForDate() публичный Метод

public GetNutrientSumForDate ( User user, NutrientEntity entity, System.DateTime date ) : decimal
user CarbonFitness.Data.Model.User
entity NutrientEntity
date System.DateTime
Результат decimal

GetNutrientSumList() публичный Метод

public GetNutrientSumList ( IEnumerable nutrients, User user ) : IEnumerable
nutrients IEnumerable
user CarbonFitness.Data.Model.User
Результат IEnumerable

GetUserIngredients() публичный Метод

public GetUserIngredients ( User user, System.DateTime dateTime ) : CarbonFitness.Data.Model.UserIngredient[]
user CarbonFitness.Data.Model.User
dateTime System.DateTime
Результат CarbonFitness.Data.Model.UserIngredient[]

UserIngredientBusinessLogic() публичный Метод

public UserIngredientBusinessLogic ( IUserIngredientRepository userIngredientRepository, IIngredientRepository ingredientRepository, INutrientRepository nutrientRepository ) : System
userIngredientRepository IUserIngredientRepository
ingredientRepository IIngredientRepository
nutrientRepository INutrientRepository
Результат System

getDatesfromuserIngredient() публичный Метод

public getDatesfromuserIngredient ( UserIngredient userIngredients ) : IEnumerable
userIngredients CarbonFitness.Data.Model.UserIngredient
Результат IEnumerable

getNutrientIngredientSumForDate() публичный Метод

public getNutrientIngredientSumForDate ( System.DateTime date, IEnumerable userIngredients, decimal>.Func valueToSum ) : decimal
date System.DateTime
userIngredients IEnumerable
valueToSum decimal>.Func
Результат decimal