C# Class Spontaneous.WebApp.Services.ExtensionMethods

Show file Open project: pashkov/Spontaneous

Public Methods

Method Description
CalcDistance ( this coupon, LocationModel location ) : void
CalculateCarbsLevel ( this rest ) : int
CalculateHealthState ( this restaurants ) : IEnumerable
ExtendedToString ( this Medals ) : string
GeneralDishToDishModel ( this generalDish, string lng = "en-US" ) : DishModel
IngredientToGeneralDish ( this ingredient, string language = "en-US" ) : GeneralDish
RestaurantOsmToRestaurantBasicData ( this restOsm ) : RestaurantBasicData
RestaurantOsmToRestaurantBasicData ( this restOsm, RestaurantBasicData basicRest ) : RestaurantBasicData
ToCouponType ( this coupon ) : CouponType
ToCouponTypeModel ( this coupon ) : CouponTypeModel
ToCouponTypeModelList ( this couponList ) : List
ToDish ( this item, Dish dish = null ) : Dish
ToDishBasicModel ( this DishesData ) : List
ToDishModel ( this dishData, string restId, bool baseLine, string lang = DefaultLang, RestaurantModel restModel = null ) : DishModel
ToDishModel ( this dishData, string restId, int MenuPId, bool baseLine, string lang = DefaultLang, RestaurantModel restModel = null ) : DishModel
ToDishModel ( this dishData, string restId, int MenuPId, string lang = DefaultLang ) : DishModel
ToDishModel ( this dishData, string restId, string lang = DefaultLang ) : DishModel
ToDishModel ( this DishesData, string RestId, int MenuPId, string lang = DefaultLang, RestaurantModel restaurantModel = null ) : List
ToDishModelBaseLine ( this dishData, string restId, int MenuPId, string lang = DefaultLang, RestaurantModel restModel = null ) : DishModel
ToDishModelBaseLine ( this dishData, string restId, string lang = DefaultLang ) : DishModel
ToDishModelList ( this generalDishList, string lng = "en-US" ) : List
ToMeal ( this portionsModel ) : Meal
ToMealViewModel ( this meal ) : MealViewModel
ToMenuBasicModel ( this MenuData ) : Menu
ToMenuModel ( this MenuData, string RestId, string lang, RestaurantModel restaurantModel = null ) : MenuModel
ToMenuPartBasic ( this menuPartModel ) : MenuPart
ToMenuPartsBasicModel ( this MenuData ) : List
ToMenuPartsModel ( this MenuData, string RestId, string lang, RestaurantModel restaurantModel ) : List
ToPortion ( this portionModel ) : Portion
ToPortionModel ( this portion, string restaurantId ) : PortionModel
ToPortionModel ( this portion, string restaurantId, int menuPartId ) : PortionModel
ToProductCatalogModel ( this productDataList ) : List
ToProductCatalogModel ( this productData ) : ProductCatalogViewModel
ToRecipeModel ( this recipeDataList ) : List
ToRecipeModel ( this recipeData ) : RecipeModel
ToRestaurantBasicModel ( this restaurantData ) : RestaurantBasicData
ToRestaurantModel ( this restaurantDataList, bool withMenu = true ) : List
ToRestaurantModel ( this defaultMenuRest, bool withMenu = true, string lang = DefaultLang ) : RestaurantModel
ToRestaurantModel ( this restaurantData, bool withMenu = true, string lang = DefaultLang, RestaurantModel restModel = null ) : RestaurantModel
ToUserMedalModel ( this Medals, LocationModel location = null ) : List
ToUserMedalModel ( this medal ) : UserMedalModel
ToWeightType ( this weight, Dish dish, string lang = DefaultLang ) : WeightType
ToWeightTypeModel ( this weight, string lang = DefaultLang ) : WeightTypeModel
findDishesInRestList ( this restaurants, string searchText ) : IEnumerable

Private Methods

Method Description
GetRestauranMappedState ( RestaurantBasicData restaurantData ) : SuspiciousState

Method Details

CalcDistance() public static method

public static CalcDistance ( this coupon, LocationModel location ) : void
coupon this
location Spontaneous.WebApp.Models.LocationModel
return void

CalculateCarbsLevel() public static method

public static CalculateCarbsLevel ( this rest ) : int
rest this
return int

CalculateHealthState() public static method

public static CalculateHealthState ( this restaurants ) : IEnumerable
restaurants this
return IEnumerable

ExtendedToString() public static method

public static ExtendedToString ( this Medals ) : string
Medals this
return string

GeneralDishToDishModel() public static method

public static GeneralDishToDishModel ( this generalDish, string lng = "en-US" ) : DishModel
generalDish this
lng string
return Spontaneous.WebApp.Models.DishModel

IngredientToGeneralDish() public static method

public static IngredientToGeneralDish ( this ingredient, string language = "en-US" ) : GeneralDish
ingredient this
language string
return Spontaneous.DataModel.GeneralDish

RestaurantOsmToRestaurantBasicData() public static method

public static RestaurantOsmToRestaurantBasicData ( this restOsm ) : RestaurantBasicData
restOsm this
return Spontaneous.DataModel.RestaurantBasicData

RestaurantOsmToRestaurantBasicData() public static method

public static RestaurantOsmToRestaurantBasicData ( this restOsm, RestaurantBasicData basicRest ) : RestaurantBasicData
restOsm this
basicRest Spontaneous.DataModel.RestaurantBasicData
return Spontaneous.DataModel.RestaurantBasicData

ToCouponType() public static method

public static ToCouponType ( this coupon ) : CouponType
coupon this
return CouponType

ToCouponTypeModel() public static method

public static ToCouponTypeModel ( this coupon ) : CouponTypeModel
coupon this
return CouponTypeModel

ToCouponTypeModelList() public static method

public static ToCouponTypeModelList ( this couponList ) : List
couponList this
return List

ToDish() public static method

public static ToDish ( this item, Dish dish = null ) : Dish
item this
dish Dish
return Dish

ToDishBasicModel() public static method

public static ToDishBasicModel ( this DishesData ) : List
DishesData this
return List

ToDishModel() public static method

public static ToDishModel ( this dishData, string restId, bool baseLine, string lang = DefaultLang, RestaurantModel restModel = null ) : DishModel
dishData this
restId string
baseLine bool
lang string
restModel RestaurantModel
return DishModel

ToDishModel() public static method

public static ToDishModel ( this dishData, string restId, int MenuPId, bool baseLine, string lang = DefaultLang, RestaurantModel restModel = null ) : DishModel
dishData this
restId string
MenuPId int
baseLine bool
lang string
restModel RestaurantModel
return DishModel

ToDishModel() public static method

public static ToDishModel ( this dishData, string restId, int MenuPId, string lang = DefaultLang ) : DishModel
dishData this
restId string
MenuPId int
lang string
return DishModel

ToDishModel() public static method

public static ToDishModel ( this dishData, string restId, string lang = DefaultLang ) : DishModel
dishData this
restId string
lang string
return DishModel

ToDishModel() public static method

public static ToDishModel ( this DishesData, string RestId, int MenuPId, string lang = DefaultLang, RestaurantModel restaurantModel = null ) : List
DishesData this
RestId string
MenuPId int
lang string
restaurantModel RestaurantModel
return List

ToDishModelBaseLine() public static method

public static ToDishModelBaseLine ( this dishData, string restId, int MenuPId, string lang = DefaultLang, RestaurantModel restModel = null ) : DishModel
dishData this
restId string
MenuPId int
lang string
restModel RestaurantModel
return DishModel

ToDishModelBaseLine() public static method

public static ToDishModelBaseLine ( this dishData, string restId, string lang = DefaultLang ) : DishModel
dishData this
restId string
lang string
return DishModel

ToDishModelList() public static method

public static ToDishModelList ( this generalDishList, string lng = "en-US" ) : List
generalDishList this
lng string
return List

ToMeal() public static method

public static ToMeal ( this portionsModel ) : Meal
portionsModel this
return Meal

ToMealViewModel() public static method

public static ToMealViewModel ( this meal ) : MealViewModel
meal this
return MealViewModel

ToMenuBasicModel() public static method

public static ToMenuBasicModel ( this MenuData ) : Menu
MenuData this
return Menu

ToMenuModel() public static method

public static ToMenuModel ( this MenuData, string RestId, string lang, RestaurantModel restaurantModel = null ) : MenuModel
MenuData this
RestId string
lang string
restaurantModel RestaurantModel
return MenuModel

ToMenuPartBasic() public static method

public static ToMenuPartBasic ( this menuPartModel ) : MenuPart
menuPartModel this
return MenuPart

ToMenuPartsBasicModel() public static method

public static ToMenuPartsBasicModel ( this MenuData ) : List
MenuData this
return List

ToMenuPartsModel() public static method

public static ToMenuPartsModel ( this MenuData, string RestId, string lang, RestaurantModel restaurantModel ) : List
MenuData this
RestId string
lang string
restaurantModel RestaurantModel
return List

ToPortion() public static method

public static ToPortion ( this portionModel ) : Portion
portionModel this
return Portion

ToPortionModel() public static method

public static ToPortionModel ( this portion, string restaurantId ) : PortionModel
portion this
restaurantId string
return PortionModel

ToPortionModel() public static method

public static ToPortionModel ( this portion, string restaurantId, int menuPartId ) : PortionModel
portion this
restaurantId string
menuPartId int
return PortionModel

ToProductCatalogModel() public static method

public static ToProductCatalogModel ( this productDataList ) : List
productDataList this
return List

ToProductCatalogModel() public static method

public static ToProductCatalogModel ( this productData ) : ProductCatalogViewModel
productData this
return ProductCatalogViewModel

ToRecipeModel() public static method

public static ToRecipeModel ( this recipeDataList ) : List
recipeDataList this
return List

ToRecipeModel() public static method

public static ToRecipeModel ( this recipeData ) : RecipeModel
recipeData this
return RecipeModel

ToRestaurantBasicModel() public static method

public static ToRestaurantBasicModel ( this restaurantData ) : RestaurantBasicData
restaurantData this
return RestaurantBasicData

ToRestaurantModel() public static method

public static ToRestaurantModel ( this restaurantDataList, bool withMenu = true ) : List
restaurantDataList this
withMenu bool
return List

ToRestaurantModel() public static method

public static ToRestaurantModel ( this defaultMenuRest, bool withMenu = true, string lang = DefaultLang ) : RestaurantModel
defaultMenuRest this
withMenu bool
lang string
return RestaurantModel

ToRestaurantModel() public static method

public static ToRestaurantModel ( this restaurantData, bool withMenu = true, string lang = DefaultLang, RestaurantModel restModel = null ) : RestaurantModel
restaurantData this
withMenu bool
lang string
restModel RestaurantModel
return RestaurantModel

ToUserMedalModel() public static method

public static ToUserMedalModel ( this Medals, LocationModel location = null ) : List
Medals this
location LocationModel
return List

ToUserMedalModel() public static method

public static ToUserMedalModel ( this medal ) : UserMedalModel
medal this
return UserMedalModel

ToWeightType() public static method

public static ToWeightType ( this weight, Dish dish, string lang = DefaultLang ) : WeightType
weight this
dish Dish
lang string
return WeightType

ToWeightTypeModel() public static method

public static ToWeightTypeModel ( this weight, string lang = DefaultLang ) : WeightTypeModel
weight this
lang string
return WeightTypeModel

findDishesInRestList() public static method

public static findDishesInRestList ( this restaurants, string searchText ) : IEnumerable
restaurants this
searchText string
return IEnumerable