public GameScreen(ISaveGameService saveService, IHighscoreService highscores) { _saves = saveService; _highscores = highscores; _nextAtoms = new Stack <int>(); }
static void Main(string[] args) { Uri baseAddress = new Uri("net.tcp://localhost:8009/Highscore"); EndpointAddress address = new EndpointAddress(baseAddress); NetTcpBinding binding = new NetTcpBinding(); using (var factory = new ChannelFactory <IHighscoreService>(binding, address)) { IHighscoreService svc = factory.CreateChannel(); svc.CreateGame("LoL"); var games = svc.GetGames(); foreach (var item in games) { Console.WriteLine(item.Name); } (svc as IChannel).Close(); Console.ReadKey(); } }
public HighscoresController(IHighscoreService highscoreService) { this.highscoreService = highscoreService; }
public HighscoreScreen(IHighscoreService highscore) { _highscore = highscore; }
public void RegisterHighscoreService(string name, IHighscoreService service) { _services.Add(name, service); }