public async Task InterceptAsync(IPersistentRepresentation message) { var result = await _predicate(message); if ((_negate && !result) || (!_negate && result)) { await _next.InterceptAsync(message); } }
public async Task InterceptAsync(IPersistentRepresentation message) { var type = message.Payload.GetType(); if (_messageType.IsAssignableFrom(type)) { await _next.InterceptAsync(message); } }
public async Task InterceptAsync(IPersistentRepresentation message) { await Task.Delay(_delay); await _next.InterceptAsync(message); }