Example #1
0
            /// <summary>
            /// Reads and updates the register.
            /// </summary>
            public override T Update(Func <T, T> func)
            {
                var op = this.Context.Runtime.GetExecutingOperation <ActorOperation>();

                this.Context.SendEvent(this.RegisterActor, SharedRegisterEvent.UpdateEvent(func, op.Actor.Id));
                var e = op.Actor.ReceiveEventAsync(typeof(SharedRegisterResponseEvent <T>)).Result as SharedRegisterResponseEvent <T>;

                return(e.Value);
            }