We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54d04c5 commit 688b7deCopy full SHA for 688b7de
src/Shared/TypeNameHelper/TypeNameHelper.cs
@@ -4,6 +4,7 @@
4
using System;
5
using System.Text;
6
using System.Collections.Generic;
7
+using System.Diagnostics.CodeAnalysis;
8
9
#nullable enable
10
@@ -33,7 +34,8 @@ internal static class TypeNameHelper
33
34
{ typeof(ushort), "ushort" }
35
};
36
- public static string? GetTypeDisplayName(object item, bool fullName = true)
37
+ [return: NotNullIfNotNull("item")]
38
+ public static string? GetTypeDisplayName(object? item, bool fullName = true)
39
{
40
return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
41
}
0 commit comments