예제 #1
0
        public int StructWithInterfaceInterfaceMethod()
        {
            StructWithInterface aStructWithInterface = aStructWithInterfaceField;

            int x = 0;

            for (int i = 0; i < InnerIterationCount; i++)
            {
                x = aStructWithInterface.InterfaceMethod();
            }

            return(x);
        }
예제 #2
0
        public static void StructWithInterfaceInterfaceMethod()
        {
            StructWithInterface aStructWithInterface = new StructWithInterface();

            foreach (var iteration in Benchmark.Iterations)
            {
                using (iteration.StartMeasurement())
                    for (int i = 0; i < Benchmark.InnerIterationCount; i++)
                    {
                        aStructWithInterface.InterfaceMethod();
                    }
            }
        }
예제 #3
0
 public void SetupStructWithInterfaceInterfaceMethod() => aStructWithInterfaceField = new StructWithInterface();