mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 12:44:16 +01:00
Fix IDE0280: Use 'nameof'
This commit is contained in:
parent
a19094f4f3
commit
9d9d06755d
3 changed files with 4 additions and 4 deletions
|
|
@ -343,7 +343,7 @@ internal partial class ConsoleManager : IServiceType
|
||||||
|
|
||||||
private static class Traits
|
private static class Traits
|
||||||
{
|
{
|
||||||
public static void ThrowIfTIsNullableAndNull<T>(T? argument, [CallerArgumentExpression("argument")] string? paramName = null)
|
public static void ThrowIfTIsNullableAndNull<T>(T? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
|
||||||
{
|
{
|
||||||
if (argument == null && !typeof(T).IsValueType)
|
if (argument == null && !typeof(T).IsValueType)
|
||||||
throw new ArgumentNullException(paramName);
|
throw new ArgumentNullException(paramName);
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ public class AddonLifecycleWidget : IDataWindowWidget
|
||||||
public string DisplayName { get; init; } = "Addon Lifecycle";
|
public string DisplayName { get; init; } = "Addon Lifecycle";
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
[MemberNotNullWhen(true, "AddonLifecycle")]
|
[MemberNotNullWhen(true, nameof(AddonLifecycle))]
|
||||||
public bool Ready { get; set; }
|
public bool Ready { get; set; }
|
||||||
|
|
||||||
private AddonLifecycle? AddonLifecycle { get; set; }
|
private AddonLifecycle? AddonLifecycle { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ public static class StringExtensions
|
||||||
/// <param name="input">The input string.</param>
|
/// <param name="input">The input string.</param>
|
||||||
/// <param name="culture"><inheritdoc cref="string.ToLower(CultureInfo)" path="/param[@name='cultureInfo']"/></param>
|
/// <param name="culture"><inheritdoc cref="string.ToLower(CultureInfo)" path="/param[@name='cultureInfo']"/></param>
|
||||||
/// <returns>A new string with the first character converted to uppercase.</returns>
|
/// <returns>A new string with the first character converted to uppercase.</returns>
|
||||||
[return: NotNullIfNotNull("input")]
|
[return: NotNullIfNotNull(nameof(input))]
|
||||||
public static string? FirstCharToUpper(this string? input, CultureInfo? culture = null) =>
|
public static string? FirstCharToUpper(this string? input, CultureInfo? culture = null) =>
|
||||||
string.IsNullOrWhiteSpace(input)
|
string.IsNullOrWhiteSpace(input)
|
||||||
? input
|
? input
|
||||||
|
|
@ -69,7 +69,7 @@ public static class StringExtensions
|
||||||
/// <param name="input">The input string.</param>
|
/// <param name="input">The input string.</param>
|
||||||
/// <param name="culture"><inheritdoc cref="string.ToLower(CultureInfo)" path="/param[@name='cultureInfo']"/></param>
|
/// <param name="culture"><inheritdoc cref="string.ToLower(CultureInfo)" path="/param[@name='cultureInfo']"/></param>
|
||||||
/// <returns>A new string with the first character converted to lowercase.</returns>
|
/// <returns>A new string with the first character converted to lowercase.</returns>
|
||||||
[return: NotNullIfNotNull("input")]
|
[return: NotNullIfNotNull(nameof(input))]
|
||||||
public static string? FirstCharToLower(this string? input, CultureInfo? culture = null) =>
|
public static string? FirstCharToLower(this string? input, CultureInfo? culture = null) =>
|
||||||
string.IsNullOrWhiteSpace(input)
|
string.IsNullOrWhiteSpace(input)
|
||||||
? input
|
? input
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue