public static CallTargetReturn <TReturn> EndMethod <TIntegration, TTarget, TReturn>(TTarget instance, TReturn returnValue, Exception exception, CallTargetState state) { if (IntegrationOptions <TIntegration, TTarget> .IsIntegrationEnabled) { return(EndMethodHandler <TIntegration, TTarget, TReturn> .Invoke(instance, returnValue, exception, state)); } return(new CallTargetReturn <TReturn>(returnValue)); }
public static CallTargetReturn EndMethod <TIntegration, TTarget>(TTarget instance, Exception exception, CallTargetState state) { if (IntegrationOptions <TIntegration, TTarget> .IsIntegrationEnabled) { return(EndMethodHandler <TIntegration, TTarget> .Invoke(instance, exception, state)); } return(CallTargetReturn.GetDefault()); }