public static SimpleSet Create(int nbItems)
 {
     return(new SimpleSet()
     {
         VerySimpleClasses = Enumerable.Range(0, nbItems).Select(i => VerySimpleClass.Create()).ToList()
     });
 }
Esempio n. 2
0
        public static DictionarySet Create(int count)
        {
            Random rnd    = new Random();
            var    result = new DictionarySet()
            {
                Id          = Guid.NewGuid(),
                DictSimple  = new Dictionary <string, int>(),
                DictObjects = new Dictionary <SimpleClass, VerySimpleClass>()
            };

            Enumerable.Range(1, count).ToList().ForEach(i => result.DictSimple.Add(Guid.NewGuid().ToString(), i));
            Enumerable.Range(1, count).ToList().ForEach(i => result.DictObjects.Add(SimpleClass.Create(i), VerySimpleClass.Create()));
            return(result);
        }