示例#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();