From cf10239e70408533a0138f9afb5a45ee4e615e99 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 13 Oct 2021 12:51:41 +0900 Subject: [PATCH] Add a few nullabilities and DCC excludes --- osu.Game/Database/IHasRealmFiles.cs | 2 ++ osu.Game/Database/INamedFile.cs | 8 +++++--- osu.Game/Models/RealmBeatmapDifficulty.cs | 2 ++ osu.Game/Models/RealmFile.cs | 2 ++ osu.Game/Models/RealmNamedFileUsage.cs | 2 ++ osu.Game/Stores/RealmFileStore.cs | 2 ++ 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/osu.Game/Database/IHasRealmFiles.cs b/osu.Game/Database/IHasRealmFiles.cs index 2adfe73d1e..024d9f2a89 100644 --- a/osu.Game/Database/IHasRealmFiles.cs +++ b/osu.Game/Database/IHasRealmFiles.cs @@ -4,6 +4,8 @@ using System.Collections.Generic; using osu.Game.Models; +#nullable enable + namespace osu.Game.Database { /// diff --git a/osu.Game/Database/INamedFile.cs b/osu.Game/Database/INamedFile.cs index 9c94aed38c..2bd45d4e42 100644 --- a/osu.Game/Database/INamedFile.cs +++ b/osu.Game/Database/INamedFile.cs @@ -3,15 +3,17 @@ using osu.Game.Models; +#nullable enable + namespace osu.Game.Database { /// - /// Represent a join model which gives a filename and scope to a . + /// Represents a join model which gives a filename and scope to a . /// public interface INamedFile { - public string Filename { get; set; } + string Filename { get; set; } - public RealmFile File { get; set; } + RealmFile File { get; set; } } } diff --git a/osu.Game/Models/RealmBeatmapDifficulty.cs b/osu.Game/Models/RealmBeatmapDifficulty.cs index 44bfdda491..3c1dad69e4 100644 --- a/osu.Game/Models/RealmBeatmapDifficulty.cs +++ b/osu.Game/Models/RealmBeatmapDifficulty.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using osu.Framework.Testing; using osu.Game.Beatmaps; using Realms; @@ -8,6 +9,7 @@ using Realms; namespace osu.Game.Models { + [ExcludeFromDynamicCompile] [MapTo("BeatmapDifficulty")] public class RealmBeatmapDifficulty : EmbeddedObject, IBeatmapDifficultyInfo { diff --git a/osu.Game/Models/RealmFile.cs b/osu.Game/Models/RealmFile.cs index 6836d79d2d..2715f4be45 100644 --- a/osu.Game/Models/RealmFile.cs +++ b/osu.Game/Models/RealmFile.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System.IO; +using osu.Framework.Testing; using osu.Game.IO; using Realms; @@ -9,6 +10,7 @@ using Realms; namespace osu.Game.Models { + [ExcludeFromDynamicCompile] [MapTo("File")] public class RealmFile : RealmObject, IFileInfo { diff --git a/osu.Game/Models/RealmNamedFileUsage.cs b/osu.Game/Models/RealmNamedFileUsage.cs index 59b446112d..ba12d51d0b 100644 --- a/osu.Game/Models/RealmNamedFileUsage.cs +++ b/osu.Game/Models/RealmNamedFileUsage.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using JetBrains.Annotations; +using osu.Framework.Testing; using osu.Game.Database; using osu.Game.IO; using Realms; @@ -10,6 +11,7 @@ using Realms; namespace osu.Game.Models { + [ExcludeFromDynamicCompile] public class RealmNamedFileUsage : EmbeddedObject, INamedFile, INamedFileUsage { public RealmFile File { get; set; } = null!; diff --git a/osu.Game/Stores/RealmFileStore.cs b/osu.Game/Stores/RealmFileStore.cs index 5082b2c65b..f7b7471634 100644 --- a/osu.Game/Stores/RealmFileStore.cs +++ b/osu.Game/Stores/RealmFileStore.cs @@ -8,6 +8,7 @@ using osu.Framework.Extensions; using osu.Framework.IO.Stores; using osu.Framework.Logging; using osu.Framework.Platform; +using osu.Framework.Testing; using osu.Game.Database; using osu.Game.Models; using Realms; @@ -19,6 +20,7 @@ namespace osu.Game.Stores /// /// Handles the storing of files to the file system (and database) backing. /// + [ExcludeFromDynamicCompile] public class RealmFileStore { private readonly RealmContextFactory realmFactory;