public void testname() { var service = new CommandHubService(); var dumbService = new DumbService(); // act service.Subscribe <Something>(dumbService.Do); service.Send(new Something()); dumbService.Done .Should() .BeTrue(); }
public Game() { SetupLog(); log.Information("New game started"); Hub = new CommandHubService(); var campService = new CampService(); Hub.Subscribe <DiggerInCamp>(campService.Handle); Hub.Subscribe <DiggerLeftCamp>(campService.Handle); services.Add(campService); var storeService = new StoreService(); Hub.Subscribe <DiggerInStore>(storeService.Handle); Hub.Subscribe <DiggerLeftStore>(storeService.Handle); Hub.Subscribe <PlayerOpenStore>(storeService.Handle); Hub.Subscribe <PlayerBuyItem>(storeService.Handle); services.Add(storeService); CreatePlayer(); }
public Camp(CommandHubService service) { this.service = service; }
public Player(CommandHubService hub) { this.hub = hub; log.Information("{actor} created", "Player"); }
public BlockBuilder BuildStore(CommandHubService hub = null) { hub = hub ?? new CommandHubService(); map.TileMap[2, 1].SetItem(new Store(hub)); return(this); }
public Store(CommandHubService service) { this.service = service; }