问题描述:

Like actors have a pre and post method for any Interface method in an Actor service like below

protected override Task OnPreActorMethodAsync(ActorMethodContext c)

protected override Task OnPostActorMethodAsync(ActorMethodContext c)

Do we have anything similar for a Stateless Service and Statuful Service. The intention is to know if a method has been entered and when it leaves that method.

网友答案:

No. Actors run within a special framework that does some magic around method execution (like enforcing single-threaded access). Stateless and stateful services don't run in any sort of framework. They are literally just regular .NET objects.

相关阅读:
Top