summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Caching/Mods/ModCacheMemoryRepository.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-12 19:15:39 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-04-12 19:15:39 -0400
commit0b48c1748b354458059c7607415288de072b01e9 (patch)
treef63fd950f565d363414eb692be9024895cdea174 /src/SMAPI.Web/Framework/Caching/Mods/ModCacheMemoryRepository.cs
parent9fbed0fa1f28a9b0fe0b952a78b10e2d475adb03 (diff)
downloadSMAPI-0b48c1748b354458059c7607415288de072b01e9.tar.gz
SMAPI-0b48c1748b354458059c7607415288de072b01e9.tar.bz2
SMAPI-0b48c1748b354458059c7607415288de072b01e9.zip
enable nullable annotations in the web project & related code (#837)
Diffstat (limited to 'src/SMAPI.Web/Framework/Caching/Mods/ModCacheMemoryRepository.cs')
-rw-r--r--src/SMAPI.Web/Framework/Caching/Mods/ModCacheMemoryRepository.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Framework/Caching/Mods/ModCacheMemoryRepository.cs b/src/SMAPI.Web/Framework/Caching/Mods/ModCacheMemoryRepository.cs
index 338562d8..4ba0bd20 100644
--- a/src/SMAPI.Web/Framework/Caching/Mods/ModCacheMemoryRepository.cs
+++ b/src/SMAPI.Web/Framework/Caching/Mods/ModCacheMemoryRepository.cs
@@ -1,7 +1,6 @@
-#nullable disable
-
using System;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.Linq;
using StardewModdingAPI.Toolkit.Framework.UpdateData;
@@ -25,7 +24,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Mods
/// <param name="id">The mod's unique ID within the <paramref name="site"/>.</param>
/// <param name="mod">The fetched mod.</param>
/// <param name="markRequested">Whether to update the mod's 'last requested' date.</param>
- public bool TryGetMod(ModSiteKey site, string id, out Cached<IModPage> mod, bool markRequested = true)
+ public bool TryGetMod(ModSiteKey site, string id, [NotNullWhen(true)] out Cached<IModPage>? mod, bool markRequested = true)
{
// get mod
if (!this.Mods.TryGetValue(this.GetKey(site, id), out var cachedMod))