Skip to content

Commit

Permalink
Add generic scoped filter type to configuration JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
phatboyg committed May 22, 2023
1 parent 967a9d0 commit a4163e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MassTransit/Middleware/ScopedCompensateFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ namespace MassTransit.Middleware
{
using System.Threading.Tasks;
using DependencyInjection;
using Metadata;


public class ScopedCompensateFilter<TActivity, TArguments, TFilter> :
Expand Down Expand Up @@ -29,6 +30,7 @@ public async Task Send(CompensateContext<TArguments> context, IPipe<CompensateCo
public void Probe(ProbeContext context)
{
var scope = context.CreateFilterScope("scopedFilter");
scope.Add("filter", TypeMetadataCache<TFilter>.ShortName);

_scopeProvider.Probe(scope);
}
Expand Down
2 changes: 2 additions & 0 deletions src/MassTransit/Middleware/ScopedConsumeFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ namespace MassTransit.Middleware
{
using System.Threading.Tasks;
using DependencyInjection;
using Metadata;


public class ScopedConsumeFilter<T, TFilter> :
Expand All @@ -28,6 +29,7 @@ public async Task Send(ConsumeContext<T> context, IPipe<ConsumeContext<T>> next)
public void Probe(ProbeContext context)
{
var scope = context.CreateFilterScope("scopedFilter");
scope.Add("filter", TypeMetadataCache<TFilter>.ShortName);

_scopeProvider.Probe(scope);
}
Expand Down
2 changes: 2 additions & 0 deletions src/MassTransit/Middleware/ScopedExecuteFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ namespace MassTransit.Middleware
{
using System.Threading.Tasks;
using DependencyInjection;
using Metadata;


public class ScopedExecuteFilter<TActivity, TArguments, TFilter> :
Expand Down Expand Up @@ -29,6 +30,7 @@ public async Task Send(ExecuteContext<TArguments> context, IPipe<ExecuteContext<
public void Probe(ProbeContext context)
{
var scope = context.CreateFilterScope("scopedFilter");
scope.Add("filter", TypeMetadataCache<TFilter>.ShortName);

_scopeProvider.Probe(scope);
}
Expand Down

0 comments on commit a4163e8

Please sign in to comment.