From a232033469bf7a8e59bfaece9ea511753ff80111 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 16 Oct 2017 00:53:59 +0900 Subject: [PATCH] Fix some file headers and unused files --- osu.Game/Database/DbContextBase.cs | 8 -------- osu.Game/Database/IPopulate.cs | 5 ++++- osu.Game/Database/OsuDbContext.cs | 24 +++++++++++++++++------- 3 files changed, 21 insertions(+), 16 deletions(-) delete mode 100644 osu.Game/Database/DbContextBase.cs diff --git a/osu.Game/Database/DbContextBase.cs b/osu.Game/Database/DbContextBase.cs deleted file mode 100644 index 93f4ac4c23..0000000000 --- a/osu.Game/Database/DbContextBase.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace osu.Game.Database -{ - public abstract class DbContextBase:DbContext - { - } -} diff --git a/osu.Game/Database/IPopulate.cs b/osu.Game/Database/IPopulate.cs index 24cabf6d5a..b07312f81c 100644 --- a/osu.Game/Database/IPopulate.cs +++ b/osu.Game/Database/IPopulate.cs @@ -1,4 +1,7 @@ -namespace osu.Game.Database +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Database { public interface IPopulate { diff --git a/osu.Game/Database/OsuDbContext.cs b/osu.Game/Database/OsuDbContext.cs index 9d5111d5d8..3f019a07fa 100644 --- a/osu.Game/Database/OsuDbContext.cs +++ b/osu.Game/Database/OsuDbContext.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using osu.Framework.Logging; @@ -12,6 +15,11 @@ namespace osu.Game.Database { public class OsuDbContext : DbContext { + public DbSet BeatmapInfo { get; set; } + public DbSet BeatmapSetInfo { get; set; } + public DbSet DatabasedKeyBinding { get; set; } + public DbSet FileInfo { get; set; } + public DbSet RulesetInfo { get; set; } private readonly string connectionString; public OsuDbContext() @@ -24,12 +32,6 @@ namespace osu.Game.Database this.connectionString = connectionString; } - public DbSet BeatmapInfo { get; set; } - public DbSet BeatmapSetInfo { get; set; } - public DbSet DatabasedKeyBinding { get; set; } - public DbSet FileInfo { get; set; } - public DbSet RulesetInfo { get; set; } - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { base.OnConfiguring(optionsBuilder); @@ -53,20 +55,28 @@ namespace osu.Game.Database private class OsuDbLoggerFactory : ILoggerFactory { + #region Disposal + public void Dispose() { } + #endregion + public ILogger CreateLogger(string categoryName) => new OsuDbLogger(); public void AddProvider(ILoggerProvider provider) => new OsuDbLoggerProvider(); private class OsuDbLoggerProvider : ILoggerProvider { + #region Disposal + public void Dispose() { } + #endregion + public ILogger CreateLogger(string categoryName) => new OsuDbLogger(); }