public Task Invoke(OutgoingLogicalContext context, Func<Task> next) { collector.Add(context.LogicalMessage); return next(); } }