Skip to content

Instantly share code, notes, and snippets.

@vchircu
Created July 4, 2016 05:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vchircu/3e88ff435b92acf931b46ed4ae401e21 to your computer and use it in GitHub Desktop.
Save vchircu/3e88ff435b92acf931b46ed4ae401e21 to your computer and use it in GitHub Desktop.
/// <summary>
/// This is the base interface to implement to create a behavior that can be registered in a pipeline.
/// </summary>
/// <typeparam name="TContext">The context that this behavior should receive.</typeparam>
public interface IBehavior<in TContext> where TContext : BehaviorContext
{
/// <summary>
/// Called when the behavior is executed.
/// </summary>
/// <param name="context">The current context.</param>
/// <param name="next">The next <see cref="T:NServiceBus.Pipeline.IBehavior`1"/> in the chain to execute.</param>
void Invoke(TContext context, Action next);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment