Skip to content

Commit 4a72dd6

Browse files
committed
Allow interception of syncronous calls passing through this interceptor
Since we invoke the syncronous calls, we should allow catching of them. This allows the user more flexibility in what their interceptor can do while maintaining the async interception functionality. I understand you can create another interceptor, this just helps ensure a user can be flexible in their usage within the single interceptor.
1 parent 0016f03 commit 4a72dd6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Ninject.Extensions.Interception/AsyncInterceptor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ public abstract class AsyncInterceptor : IInterceptor
2323
/// <summary>
2424
/// Intercepts the specified invocation.
2525
/// </summary>
26+
/// <remarks>If overridden, you should invoke base.</remarks>
2627
/// <param name="invocation">The invocation to intercept.</param>
27-
public void Intercept(IInvocation invocation)
28+
public virtual void Intercept(IInvocation invocation)
2829
{
2930
var returnType = invocation.Request.Method.ReturnType;
3031
if (returnType == typeof(Task))

0 commit comments

Comments
 (0)