Exemplo n.º 1
0
        public static IEnumerable <ProductOrderCharm> GetProductOrderCharms(int count)
        {
            var index  = 1;
            var result = CharmFactory.GetCharms(count)
                         .Select(s => new ProductOrderCharm(s, index++));

            return(result);
        }
Exemplo n.º 2
0
        public static IEnumerable <CharmCategory> GetCharmCategoriesWithCharms(int categories, int charmsInCategory)
        {
            var charmCategories = new List <CharmCategory>();

            for (var i = 0; i < categories; i++)
            {
                var charmCategory = new CharmCategory($"Charm Category {i}", $"Charm Category {i}");
                charmCategory.AddCharms(CharmFactory.GetCharms(charmsInCategory));
                charmCategories.Add(charmCategory);
            }

            return(charmCategories);
        }
Exemplo n.º 3
0
 public static ProductOrderCharm GetProductOrderCharm()
 => new ProductOrderCharm(CharmFactory.GetCharm(), 1);