示例#1
0
        public static void Add12()
        {
            UInt32 x = 5;
            UInt64 y = 5;
            var    t = x + y;

            Tracker.Call(t);
        }
        public static void AssignLocalVariable()
        {
            string test;

            test = "hello";

            Tracker.Call(test);
        }
示例#3
0
        public static void Multiply1()
        {
            byte x = 5;
            int  y = 5;
            var  t = x * y;

            Tracker.Call(t);
        }
示例#4
0
        public static void Add30()
        {
            char  x = (char)5;
            Int64 y = 5;
            var   t = x + y;

            Tracker.Call(t);
        }
示例#5
0
        public static void Add22()
        {
            double x = 5;
            Int64  y = 5;
            var    t = x + y;

            Tracker.Call(t);
        }
示例#6
0
        public static void Add14()
        {
            float x = 5;
            Int32 y = 5;
            var   t = x + y;

            Tracker.Call(t);
        }
示例#7
0
        public static void Add19()
        {
            float  x = 5;
            double y = 5;
            var    t = x + y;

            Tracker.Call(t);
        }
示例#8
0
        public static void Add1()
        {
            Int16 x = 5;
            Int32 y = 5;
            var   t = x + y;

            Tracker.Call(t);
        }
示例#9
0
        public void AddEventHandler1()
        {
            var instance = new ClassWithEvent();

            instance.TestEvent += () => Tracker.Call("hello");

            instance.InvokeEvent();
        }
示例#10
0
        public static void Add18()
        {
            float  x = 5;
            UInt64 y = 5;
            var    t = x + y;

            Tracker.Call(t);
        }
示例#11
0
        public static void Add10()
        {
            UInt32 x = 5;
            Int32  y = 5;
            var    t = x + y;

            Tracker.Call(t);
        }
        public static void AssignParameterToLocalVariable(string test)
        {
            string test2;

            test2 = test;

            Tracker.Call(test2);
        }
示例#13
0
        public static void Add29()
        {
            Byte  x = 5;
            Int64 y = 5;
            var   t = x + y;

            Tracker.Call(t);
        }
示例#14
0
        public static void Add28()
        {
            decimal x = 5;
            UInt64  y = 5;
            var     t = x + y;

            Tracker.Call(t);
        }
示例#15
0
        public static void Sub1()
        {
            byte x = 5;
            int  y = 5;
            var  t = x - y;

            Tracker.Call(t);
        }
示例#16
0
        public static void Add24()
        {
            decimal x = 5;
            Int32   y = 5;
            var     t = x + y;

            Tracker.Call(t);
        }
示例#17
0
        public static void Add3()
        {
            Int32 x = 5;
            Int64 y = 5;
            var   t = x + y;

            Tracker.Call(t);
        }
        public async Task DefineDelegate7()
        {
            Func <string, Task <string> > func = async(arg) =>
            {
                return(arg);
            };

            Tracker.Call(await func("hello"));
        }
        public void DefineDelegate5()
        {
            Func <string, string> func = (arg) =>
            {
                return(arg);
            };

            Tracker.Call(func("hello"));
        }
        public void DefineDelegate3()
        {
            Func <string, string> func = delegate(string arg)
            {
                return(arg);
            };

            Tracker.Call(func("hello"));
        }
示例#21
0
        public void RemoveEventHandler4()
        {
            var instance = new ClassWithEvent();

            Tracker.Call("hello1");
            instance.TestEvent += EventHandler;
            instance.TestEvent -= EventHandler;
            instance.InvokeEvent();
        }
        public static void CreateObjectWithInitializerWithoutParanthesis()
        {
            InstanceTestClass testClass = new InstanceTestClass
            {
                Property = "Hello"
            };

            Tracker.Call(testClass.Property);
        }
        public static void TestWhile()
        {
            int i = 0;

            while (i < 5)
            {
                i = i + 1;
            }

            Tracker.Call(i);
        }
示例#24
0
        public void AddEventHandler2()
        {
            var instance = new ClassWithEvent();

            instance.TestEvent += delegate
            {
                Tracker.Call("hello");
            };

            instance.InvokeEvent();
        }
        public static void CreateObjectWithInitializer1()
        {
            InstanceTestClass testClass = new InstanceTestClass()
            {
                Property  = "Hel",
                Property2 = "lo"
            };


            Tracker.Call(testClass.Property + testClass.Property2);
        }
        public void RemoveDelegate()
        {
            Tracker.Call("hello");
            Action <object> action = (obj) => { };

            action += Tracker.Call;

            action -= Tracker.Call;

            action("hello1");
        }
        public void AddDelegate()
        {
            int    counter = 0;
            Action action  = () => counter++;

            action += () => counter++;

            action();

            Tracker.Call(counter);
        }
示例#28
0
 public static void NoException()
 {
     try
     {
         Tracker.Call("hello");
     }
     catch (Exception ex)
     {
         Tracker.Call("hello1");
     }
 }
示例#29
0
 public static void AccessCatchVariable()
 {
     try
     {
         throw new Exception("hello");
     }
     catch (Exception ex)
     {
         Tracker.Call(ex.Message);
     }
 }
示例#30
0
 public static void CatchWithoutVariable()
 {
     try
     {
         throw new Exception();
     }
     catch
     {
         Tracker.Call("hello");
     }
 }