From 67efbe156362c246bc503ff72d99f4cd2eef82d5 Mon Sep 17 00:00:00 2001 From: EMRE TEOMAN Date: Mon, 21 Jun 2021 12:53:57 +0300 Subject: [PATCH] Abstract base class for ISubscribeFilter (#911) --- .../Internal/Filter/SubscribeFilter.cs | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/DotNetCore.CAP/Internal/Filter/SubscribeFilter.cs diff --git a/src/DotNetCore.CAP/Internal/Filter/SubscribeFilter.cs b/src/DotNetCore.CAP/Internal/Filter/SubscribeFilter.cs new file mode 100644 index 0000000..c7447ba --- /dev/null +++ b/src/DotNetCore.CAP/Internal/Filter/SubscribeFilter.cs @@ -0,0 +1,36 @@ +// Copyright (c) .NET Core Community. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +// ReSharper disable once CheckNamespace +namespace DotNetCore.CAP.Filter +{ + /// + /// Abstract base class for ISubscribeFilter for use when implementing a subset of the interface methods. + /// + public abstract class SubscribeFilter : ISubscribeFilter + { + /// + /// Called before the subscriber executes. + /// + /// The . + public virtual void OnSubscribeExecuting(ExecutingContext context) + { + } + + /// + /// Called after the subscriber executes. + /// + /// The . + public virtual void OnSubscribeExecuted(ExecutedContext context) + { + } + + /// + /// Called after the subscriber has thrown an . + /// + /// The . + public virtual void OnSubscribeException(ExceptionContext context) + { + } + } +} \ No newline at end of file