public LeagueClient() { JSONDeserializer.AddDeserializer <object>(Deserialize); JSONSerializer.AddSerializer(Serialize); BackEndServer.Initialize(); Session.Initialize(); BackEndServer.AddService(this.front); }
public ReplayService(Session session) : base("/replays") { this.session = session; directory = GetStorage("replays"); Directory.CreateDirectory(directory); foreach (var file in Directory.EnumerateFiles(directory, "*.lol")) { long gameid; if (!long.TryParse(Path.GetFileNameWithoutExtension(file), out gameid)) { continue; } saved.Add(gameid); } var messages = new MessageConsumer(session); messages.Consume <PlayerCredentialsDto>(OnPlayerCredentials); BackEndServer.AddService(spectator = new SpectatorService(session, LoadReplay)); }