23 lines
846 B
C#
Raw Normal View History

2019-11-06 14:16:20 +01:00
using System;
namespace Capnp.Rpc.Interception
{
/// <summary>
/// An interception policy implements callbacks for outgoing calls and returning forwarded calls.
/// </summary>
2019-11-06 14:16:20 +01:00
public interface IInterceptionPolicy: IEquatable<IInterceptionPolicy>
{
/// <summary>
/// A caller ("Alice") initiated a new call, which is now intercepted.
/// </summary>
/// <param name="callContext">Context object</param>
2019-11-06 14:16:20 +01:00
void OnCallFromAlice(CallContext callContext);
/// <summary>
/// Given that the intercepted call was forwarded, it returned now from the target ("Bob")
/// and may (or may not) be returned to the original caller ("Alice").
/// </summary>
/// <param name="callContext"></param>
2019-11-06 14:16:20 +01:00
void OnReturnFromBob(CallContext callContext);
}
2020-01-11 17:56:12 +01:00
}