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

            int x = 0;

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

            return(x);
        }
Beispiel #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();
                    }
            }
        }
Beispiel #3
0
 public void SetupStructWithInterfaceInterfaceMethod() => aStructWithInterfaceField = new StructWithInterface();