Example #1
0
        public LeagueClient()
        {
            JSONDeserializer.AddDeserializer <object>(Deserialize);
            JSONSerializer.AddSerializer(Serialize);

            BackEndServer.Initialize();
            Session.Initialize();

            BackEndServer.AddService(this.front);
        }
Example #2
0
        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));
        }