1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-23 04:07:24 +08:00
osu-lazer/osu.Desktop.VisualTests/Platform/TestStorage.cs

29 lines
902 B
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2017-02-07 12:52:19 +08:00
using osu.Framework;
using osu.Framework.Desktop.Platform;
using SQLite.Net;
using SQLite.Net.Interop;
using SQLite.Net.Platform.Generic;
using SQLite.Net.Platform.Win32;
namespace osu.Desktop.VisualTests.Platform
{
public class TestStorage : DesktopStorage
{
public TestStorage(string baseName) : base(baseName)
{
}
public override SQLiteConnection GetDatabase(string name)
{
ISQLitePlatform platform;
if (RuntimeInfo.IsWindows)
platform = new SQLitePlatformWin32();
else
platform = new SQLitePlatformGeneric();
2017-03-07 09:59:19 +08:00
return new SQLiteConnection(platform, @":memory:");
2017-02-07 12:52:19 +08:00
}
}
2016-10-25 22:44:43 +08:00
}