protected override void WeaveMethod(MethodDefinition method, InjectionDefinition injection)
 {
     if (injection.Effect is AroundAdviceEffect)
     {
         var process = new AdviceAroundProcess(_log, method, injection);
         process.Execute();
     }
     else
     {
         throw new NotSupportedException($"Unknown effect type. {injection.Effect?.GetType().Name}");
     }
 }
Пример #2
0
 protected override void WeaveMethod(MethodDefinition method, Injection injection)
 {
     if (injection.Effect is AroundAdviceEffect)
     {
         var process = new AdviceAroundProcess(_log, injection.Source, method, (AroundAdviceEffect)injection.Effect);
         process.Execute();
     }
     else
     {
         throw new Exception("Unknown advice type.");
     }
 }