Example #1
0
        public void TestConvertChange()
        {
            var    txt  = "Convert";
            int    time = 10000000;
            IEvent e    = new TestEvent1();

            using (var t = new Never.Utils.MethodTickCount((x) => { Console.WriteLine(x); }))
            {
            }

            using (var t = new Never.Utils.MethodTickCount((x) => { Console.WriteLine(x); }))
            {
                var type = e.GetType();
                for (var i = 1; i <= time; i++)
                {
                    //Handle((dynamic)Convert.ChangeType(e, type));
                }
            }

            using (var t = new Never.Utils.MethodTickCount((x) => { Console.WriteLine(x); }))
            {
                for (var i = 1; i <= time; i++)
                {
                    //Handle((dynamic)e);
                }
            }
        }
Example #2
0
 public static void Handle(TestEvent1 e)
 {
     if (e == null)
     {
         Console.WriteLine("null");
     }
 }
Example #3
0
        public void TestDomain()
        {
            var root = new TestAggregateRoot();
            var e    = new TestEvent1();

            root.ReplyEvent(new[] { e });
            root.ReplyEvent(new[] { e });
        }
Example #4
0
 public void Handle(TestEvent1 e)
 {
 }