Example #1
0
        public override void Random()
        {
            Actors = new List <IActor>();
            SerializerFactory factory = SerializerFactory.GetFactory();
            Random            rnd     = Program.Rnd;
            int nb = rnd.Next(NB_MAX_OF_ACTORS);

            for (int i = 0; i < nb; i++)
            {
                int id = rnd.Next(factory.Count());
                IBinarySerializable obj = factory.CreateInstance <IBinarySerializable>(id);
                obj.ShouldBeSend = true;
                obj.Random();
                Actors.Add((IActor)obj);
            }
        }