Metadata used to indicate how a single method works
示例#1
0
 public BenchmarkClassMetadata(Type benchmarkClass, BenchmarkMethodMetadata setup, BenchmarkMethodMetadata run,
     BenchmarkMethodMetadata cleanup)
 {
     BenchmarkClass = benchmarkClass;
     Setup = setup;
     Run = run;
     Cleanup = cleanup;
 }
 public BenchmarkClassMetadata(Type benchmarkClass, BenchmarkMethodMetadata setup, BenchmarkMethodMetadata run,
                               BenchmarkMethodMetadata cleanup)
 {
     BenchmarkClass = benchmarkClass;
     Setup          = setup;
     Run            = run;
     Cleanup        = cleanup;
 }
 private Action<BenchmarkContext> Compile(BenchmarkMethodMetadata metadata)
 {
     if (metadata.Skip)
         return ActionBenchmarkInvoker.NoOp;
     return metadata.TakesBenchmarkContext
         ? CreateDelegateWithContext(_testClassInstance, metadata.InvocationMethod)
         : CreateDelegateWithoutContext(_testClassInstance, metadata.InvocationMethod);
 }