예제 #1
0
        async Task<string> Drop(Thing thing)
        {
            if ( killed )
                return await CheckAlive();

            if (thing != null)
            {
                this.things.Remove(thing);
                await this.roomGrain.Drop(thing);
                return "Okay.";
            }
            else
                return "I don't understand.";
        }
예제 #2
0
 private async Task MakeThing(Thing thing)
 {
     var roomGrain = GrainClient.GrainFactory.GetGrain<IRoomGrain>(thing.FoundIn);
     await roomGrain.Drop(thing);
 }
예제 #3
0
 Task IRoomGrain.Take(Thing thing)
 {
     things.RemoveAll(x => x.Name == thing.Name);
     return TaskDone.Done;
 }
예제 #4
0
 Task IRoomGrain.Drop(Thing thing)
 {
     things.RemoveAll(x => x.Id == thing.Id);
     things.Add(thing);
     return TaskDone.Done;
 }