internal static void Run() { var runner = new BenchMarkRunner(); runner.RunCase(Case00, "Aop with output"); runner.RunCase(Case02, "Tmp with output"); runner.RunCase(Case04, "Target with output "); //var x1 = AopHelper.GetInstance<ITemp>(); //RunMethod(x1); //var x2 = new Temp(new Interceptor()); //RunMethod(x2); //var x3 = new Target(); // RunMethod(x3) const int count = 1000; //Wrap(Case00,"Aop with output",count); //Wrap(Case02,"Tmp with output",count); //Wrap(Case04,"Target with output ",count); runner.RunCase(Case05, "Target", count); runner.RunCase(Case03, "Tmp", count); runner.RunCase(Case01, "Aop", count); runner.Display(); AopWrapper.Save(); }
public static object Factory(Type interFacetype, AopInterceptor interceptor) => Activator.CreateInstance(AopWrapper.CreateType(interFacetype), new[] { interceptor });
public static T Factory <T>(AopInterceptor interceptor) => (T)Activator.CreateInstance(AopWrapper.CreateType <T>(), new[] { interceptor });