예제 #1
0
        public BeanFactoryTask(int iterations)
            : base(iterations)
        {
            InitializeFactory();
            FFoo foo = (FFoo)factory.GetObject("foo");

            Assert.AreEqual(5, foo.i);
            Assert.AreEqual("test", foo.s);
            Assert.AreSame(foo.bar.tee, foo.copy.tee);
            Assert.AreEqual(5, foo.bar.i);
            Assert.AreEqual("test", foo.bar.Tee.S);
        }
예제 #2
0
        public void Test()
        {
            int numIterations = 10000;

            start = DateTime.Now;
            DefaultListableObjectFactory factory = new DefaultListableObjectFactory();

            InitFactory(factory);
            for (int i = 0; i < numIterations; i++)
            {
                FFoo foo = (FFoo)factory.GetObject("foo");
            }
            stop = DateTime.Now;
            double timeElapsed = Elapsed;

            PrintTest("Creations", numIterations, timeElapsed);
        }
예제 #3
0
 public override void DoExecute()
 {
     FFoo foo = (FFoo)factory.GetObject("foo");
 }