public int StructWithInterfaceInterfaceMethod() { StructWithInterface aStructWithInterface = aStructWithInterfaceField; int x = 0; for (int i = 0; i < InnerIterationCount; i++) { x = aStructWithInterface.InterfaceMethod(); } return(x); }
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(); } } }
public void SetupStructWithInterfaceInterfaceMethod() => aStructWithInterfaceField = new StructWithInterface();