public PersonalizerController()

in TailwindTraders.Website/Source/Tailwind.Traders.Web/Controllers/PersonalizerController.cs [24:60]


        public PersonalizerController(IOptionsSnapshot<Settings> settings)
        {
            personalizerClient = CreatePersonalizerClient(settings.Value.Personalizer.ApiKey, settings.Value.Personalizer.Endpoint);
            featureMap = new Dictionary<string, IList<object>>();

            IList<object> gardenCenterFeatures = new List<object>()
            {
                new { avgPrice = 10 },
                new { categorySize = 50 },
                new { location = "outdoors" }
            };

            IList<object> powerToolsFeatures = new List<object>()
            {
                new { avgPrice = 20 },
                new { categorySize = 100 },
                new { childproof = false },
                new { location = "indoors" }
            };
            IList<object> plumbingFeatures = new List<object>()
            {
                new { avgPrice = 30 },
                new { categorySize = 150 },
                new { location = "indoors" }
            };
            IList<object> electricalFeatures = new List<object>()
            {
                new { avgPrice = 40 },
                new { categorySize = 200 },
                new { location = "indoors" }
            };

            featureMap.Add(powerTools, powerToolsFeatures);
            featureMap.Add(gardenCenter, gardenCenterFeatures);
            featureMap.Add(electrical, electricalFeatures);
            featureMap.Add(plumbing, plumbingFeatures);
        }