diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-12 20:52:01 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-12 20:52:01 -0400 |
commit | 5f7a92a74592a53529890eebb1ee9fe519afd92f (patch) | |
tree | 67c515794b8dcc7d4721adc3b2f239edd68f9009 /src/SMAPI.Toolkit/Framework/Clients/Wiki | |
parent | c3851ae2e6c8fb286d4744612fbfea039d1baf7f (diff) | |
download | SMAPI-5f7a92a74592a53529890eebb1ee9fe519afd92f.tar.gz SMAPI-5f7a92a74592a53529890eebb1ee9fe519afd92f.tar.bz2 SMAPI-5f7a92a74592a53529890eebb1ee9fe519afd92f.zip |
enable nullable annotations in unit tests (#837)
Diffstat (limited to 'src/SMAPI.Toolkit/Framework/Clients/Wiki')
-rw-r--r-- | src/SMAPI.Toolkit/Framework/Clients/Wiki/ChangeDescriptor.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/SMAPI.Toolkit/Framework/Clients/Wiki/ChangeDescriptor.cs b/src/SMAPI.Toolkit/Framework/Clients/Wiki/ChangeDescriptor.cs index 5978803e..8646f1cc 100644 --- a/src/SMAPI.Toolkit/Framework/Clients/Wiki/ChangeDescriptor.cs +++ b/src/SMAPI.Toolkit/Framework/Clients/Wiki/ChangeDescriptor.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics.CodeAnalysis; using System.Linq; namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki @@ -47,6 +48,9 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki /// <summary>Apply the change descriptors to a comma-delimited field.</summary> /// <param name="rawField">The raw field text.</param> /// <returns>Returns the modified field.</returns> +#if NET5_0_OR_GREATER + [return: NotNullIfNotNull("rawField")] +#endif public string? ApplyToCopy(string? rawField) { // get list @@ -119,7 +123,7 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki /// <param name="descriptor">The raw change descriptor.</param> /// <param name="errors">The human-readable error message describing any invalid values that were ignored.</param> /// <param name="formatValue">Format a raw value into a normalized form if needed.</param> - public static ChangeDescriptor Parse(string descriptor, out string[] errors, Func<string, string>? formatValue = null) + public static ChangeDescriptor Parse(string? descriptor, out string[] errors, Func<string, string>? formatValue = null) { // init formatValue ??= p => p; |