예제 #1
0
파일: BeatmapManager.cs 프로젝트: Wieku/osu
        public BeatmapManager(Storage storage, RealmAccess realm, RulesetStore rulesets, IAPIProvider?api, AudioManager audioManager, IResourceStore <byte[]> gameResources, GameHost?host = null,
                              WorkingBeatmap?defaultBeatmap = null, bool performOnlineLookups = false)
            : base(storage, realm)
        {
            if (performOnlineLookups)
            {
                if (api == null)
                {
                    throw new ArgumentNullException(nameof(api), "API must be provided if online lookups are required.");
                }

                onlineBeatmapLookupQueue = new BeatmapOnlineLookupQueue(api, storage);
            }

            var userResources = new RealmFileStore(realm, storage).Store;

            BeatmapTrackStore = audioManager.GetTrackStore(userResources);

            beatmapImporter = CreateBeatmapImporter(storage, realm, rulesets, onlineBeatmapLookupQueue);
            beatmapImporter.PostNotification = obj => PostNotification?.Invoke(obj);

            workingBeatmapCache = CreateWorkingBeatmapCache(audioManager, gameResources, userResources, defaultBeatmap, host);
        }
예제 #2
0
 public BeatmapImporter(Storage storage, RealmAccess realm, BeatmapOnlineLookupQueue?onlineLookupQueue = null)
     : base(storage, realm)
 {
     this.onlineLookupQueue = onlineLookupQueue;
 }
예제 #3
0
파일: BeatmapManager.cs 프로젝트: Wieku/osu
 protected virtual BeatmapImporter CreateBeatmapImporter(Storage storage, RealmAccess realm, RulesetStore rulesets, BeatmapOnlineLookupQueue?onlineLookupQueue) =>
 new BeatmapImporter(storage, realm, onlineLookupQueue);
예제 #4
0
 public BeatmapImporter(RealmContextFactory contextFactory, Storage storage, BeatmapOnlineLookupQueue?onlineLookupQueue = null)
     : base(storage, contextFactory)
 {
     this.onlineLookupQueue = onlineLookupQueue;
 }
예제 #5
0
 protected virtual BeatmapModelManager CreateBeatmapModelManager(Storage storage, RealmAccess realm, RulesetStore rulesets, BeatmapOnlineLookupQueue?onlineLookupQueue) =>
 new BeatmapModelManager(realm, storage, onlineLookupQueue);
예제 #6
0
 protected BeatmapImporter(RealmAccess realm, Storage storage, BeatmapOnlineLookupQueue?onlineLookupQueue = null)
     : base(storage, realm)
 {
     this.onlineLookupQueue = onlineLookupQueue;
 }
예제 #7
0
 public BeatmapModelManager(RealmAccess realm, Storage storage, BeatmapOnlineLookupQueue?onlineLookupQueue = null)
     : base(realm, storage, onlineLookupQueue)
 {
 }