forked from dotnet/orleans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IGrainCallContext.cs
44 lines (38 loc) · 1.22 KB
/
IGrainCallContext.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System.Reflection;
using System.Threading.Tasks;
using Orleans.Runtime;
namespace Orleans
{
/// <summary>
/// A delegate used to intercept invocation of a request.
/// </summary>
/// <param name="context">The invocation context.</param>
/// <returns>A <see cref="Task"/> which must be awaited before processing continues.</returns>
public delegate Task GrainCallFilterDelegate(IGrainCallContext context);
/// <summary>
/// Represents a method invocation as well as the result of invocation.
/// </summary>
public interface IGrainCallContext
{
/// <summary>
/// Gets the grain being invoked.
/// </summary>
IAddressable Grain { get; }
/// <summary>
/// Gets the <see cref="MethodInfo"/> of the method being invoked.
/// </summary>
MethodInfo Method { get; }
/// <summary>
/// Gets the arguments for this method invocation.
/// </summary>
object[] Arguments { get; }
/// <summary>
/// Invokes the request.
/// </summary>
Task Invoke();
/// <summary>
/// Gets or sets the result.
/// </summary>
object Result { get; set; }
}
}