Example #1
0
    /**
     * testInvokeOfAnInstanceMethodWithSetInstanceVariableWithoutInterface.
     *
     * @return
     */
    public static long testInvokeOfAnInstanceMethodWithGetInstanceVariableWithoutInterface()
    {
        int count = 0;
        ReflectionInvokeImpl invoke = new ReflectionInvokeImpl();
        DateTime             start  = DateTime.Now;

        for (int i = NB_INSTANCE_REFLECTION_TESTS; i != 0; i--)
        {
            count = count + invoke.echoWithGetVariable().Length;
        }
        DateTime end           = DateTime.Now;
        TimeSpan executionTime = end - start;

        Console.WriteLine("[ReflectionTest], Invoke Of An Instance Method With Get Instance Variable Without Interface " + NB_INSTANCE_REFLECTION_TESTS + " invoke.echoWithGetVariable().length()  , count=" + count + ", snapshot time,"
                          + executionTime.TotalMilliseconds);
        return((long)executionTime.TotalMilliseconds);
    }
 /**
  * testInvokeOfAnInstanceMethodWithSetInstanceVariableWithoutInterface.
  *
  * @return
  */
 public static long testInvokeOfAnInstanceMethodWithGetInstanceVariableWithoutInterface()
 {
     int count = 0;
     ReflectionInvokeImpl invoke = new ReflectionInvokeImpl();
     DateTime start = DateTime.Now;
     for (int i = NB_INSTANCE_REFLECTION_TESTS; i != 0; i--)
     {
         count = count + invoke.echoWithGetVariable().Length;
     }
     DateTime end = DateTime.Now;
     TimeSpan executionTime = end - start;
     Console.WriteLine("[ReflectionTest], Invoke Of An Instance Method With Get Instance Variable Without Interface " + NB_INSTANCE_REFLECTION_TESTS + " invoke.echoWithGetVariable().length()  , count=" + count + ", snapshot time,"
         + executionTime.TotalMilliseconds);
     return (long)executionTime.TotalMilliseconds;
 }