Example #1
0
 public static SimpleSet Create(int nbItems)
 {
     return(new SimpleSet()
     {
         VerySimpleClasses = Enumerable.Range(0, nbItems).Select(i => VerySimpleClass.Create()).ToList()
     });
 }
Example #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>()
            };

            foreach (var i in Enumerable.Range(1, count))
            {
                result.DictSimple.Add(Guid.NewGuid().ToString(), i);
            }

            foreach (var i in Enumerable.Range(1, count))
            {
                result.DictObjects.Add(SimpleClass.Create(i), VerySimpleClass.Create());
            }

            return(result);
        }