示例#1
0
        Task IRoomGrain.SetInfo(RoomInfo info)
        {
            this.description = info.Description;

            foreach (var kv in info.Directions)
            {
                this.exits[kv.Key] = GrainFactory.GetGrain<IRoomGrain>(kv.Value);
            }
            return TaskDone.Done;
        }
示例#2
0
 private async Task<IRoomGrain> MakeRoom(RoomInfo data)
 {
     var roomGrain = GrainClient.GrainFactory.GetGrain<IRoomGrain>(data.Id);
     await roomGrain.SetInfo(data);
     return roomGrain;
 }