Inserts a behavior into the stunt behavior pipeline at the specified index.
public static TStunt InsertBehavior<TStunt>(this TStunt stunt, int index, ExecuteHandler behavior, AppliesToHandler? appliesTo = null, string? name = null)
where TStunt : IStunt
The stunt to insert the behavior to.
The index to insert the behavior at.
(invocation, next) => invocation.CreateValueReturn() | invocation.CreateExceptionReturn() | next().Invoke(invocation, next)
invocation => true|false
Optional friendly name for the behavior.