예제 #1
0
        public DataPayload()
        {
            ContentItemTypes = RandomUtilities.RandomList(5, 5, RandomUtilities.RandomContentItemType).ToArray();

            ContentItems = RandomUtilities.RandomList(7, 10, RandomUtilities.RandomContentItem).ToArray();

            foreach (var contentItem in ContentItems)
            {
                contentItem.ContentType = RandomUtilities.OneRandom(ContentItemTypes);
            }

            Sessions = RandomUtilities.RandomList(3, 5, RandomUtilities.RandomSession);

            var contentEncounters = ContentItems.SelectMany(x => x.Encounters).ToArray();

            foreach (var session in Sessions)
            {
                session.Encounters.Add(RandomUtilities.OneRandom(contentEncounters));
            }
        }