// 摘要:
// Interception behaviors implement this interface and are called for each invocation
// of the pipelines that they're included in.
public interface IInterceptionBehavior
{
// 摘要:
// Returns a flag indicating if this behavior will actually do anything when
// invoked.
//
// 备注:
// This is used to optimize interception. If the behaviors won't actually do
// anything (for example, PIAB where no policies match) then the interception
// mechanism can be skipped completely.
bool WillExecute { get; }
// 摘要:
// Returns the interfaces required by the behavior for the objects it intercepts.
//
// 返回结果:
// The required interfaces.
IEnumerable<Type> GetRequiredInterfaces();
//
// 摘要:
// Implement this method to execute your behavior processing.
//
// 参数:
// input:
// Inputs to the current call to the target.
//
// getNext:
// Delegate to execute to get the next delegate in the behavior chain.
//
// 返回结果:
// Return value from the target.
IMethodReturn Invoke(IMethodInvocation input, GetNextInterceptionBehaviorDelegate getNext);
}