/// <summary> /// gets the Recipe Creation Send To Shop Settings for a Partner /// </summary> public RecipeCreationSendToShopSettings GetRecipeCreationSendToShopSettings(bool includeIngredients = true) { var sendToShopSettings = new RecipeCreationSendToShopSettings(); var partnerId = this.PartnerIdResolver.Resolve(); if (partnerId.HasValue) { var partner = this.PartnerService.GetPartnerById(partnerId.Value); if (partner != null) { if (this.PartnerService.PartnerOffersService(partnerId.Value, PartnerServiceType.SendToShop)) { var partnerIngredients = this.PartnerService.GetSendToShopIngredients(partnerId.Value); if (partnerIngredients.Any()) { sendToShopSettings.PartnerId = partnerId.Value; sendToShopSettings.PartnerName = partner.Name; sendToShopSettings.IsEnabled = true; if (includeIngredients) { sendToShopSettings.Ingredients = partnerIngredients; } return sendToShopSettings; } } } } return null; }
/// <summary> /// ctor the Mighty /// </summary> public RecipeCreationOptions() { this.StyleGroups = new List<BjcpStyleGroup>(); this.Fermentables = new List<Fermentable>(); this.Hops = new List<Hop>(); this.YeastGroups = new List<IngredientGroup<Yeast>>(); this.Adjuncts = new List<Adjunct>(); this.MashSteps = new List<MashStep>(); this.SendToShopSettings = new RecipeCreationSendToShopSettings(); }
/// <summary> /// ctor the Mighty /// </summary> public RecipeCreationOptions() { this.StyleGroups = new List <BjcpStyleGroup>(); this.Fermentables = new List <Fermentable>(); this.Hops = new List <Hop>(); this.YeastGroups = new List <IngredientGroup <Yeast> >(); this.Adjuncts = new List <Adjunct>(); this.MashSteps = new List <MashStep>(); this.SendToShopSettings = new RecipeCreationSendToShopSettings(); }