예제 #1
0
 public void Init()
 {
     string[] keys = File.ReadAllLines("Resources/keys.dat");
     api      = new OsuApi("2558", keys[0], keys[1]);
     replays  = new ServerReplayDb(api, "serverdata");
     beatmaps = new ServerBeatmapDb(api, "serverdata");
 }
예제 #2
0
 public void Init()
 {
     string[] keys = File.ReadAllLines("Resources/keys.dat");
     client          = new HttpClient();
     Logger.Instance = new TestLogger();
     api             = new OsuApi(client, "2558", keys[0], keys[1]);
     replays         = new ServerReplayDb(api, Path.Combine(root, "serverdata"));
     beatmaps        = new ServerBeatmapDb(api, Path.Combine(root, "serverdata"), true);
 }
예제 #3
0
        public ServerBeatmapDb(OsuApi api, string serverDir)
        {
            this.api = api;
            folder   = serverDir;
            string db = Path.Combine(serverDir, "beatmaps.db");

            if (File.Exists(db))
            {
                hashes = JsonConvert.DeserializeObject <Dictionary <string, string> >(File.ReadAllText(db));
            }
            else
            {
                hashes = new Dictionary <string, string>();
            }
        }
예제 #4
0
 public ServerReplayDb(OsuApi api, string serverFolder)
 {
     this.api          = api;
     this.serverFolder = serverFolder;
 }