Skip to content

Commit 6abeff9

Browse files
committed
Add missing [NotNull] attributes on StringLocalizerExtensions
1 parent cda137c commit 6abeff9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Microsoft.Framework.Localization.Abstractions/StringLocalizerExtensions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4+
using Microsoft.Framework.Internal;
5+
46
namespace Microsoft.Framework.Localization
57
{
68
public static class StringLocalizerExtensions
@@ -10,7 +12,7 @@ public static class StringLocalizerExtensions
1012
/// </summary>
1113
/// <param name="name">The name of the string resource.</param>
1214
/// <returns>The string resource as a <see cref="LocalizedString"/>.</returns>
13-
public static LocalizedString GetString(this IStringLocalizer stringLocalizer, string name)
15+
public static LocalizedString GetString([NotNull] this IStringLocalizer stringLocalizer, [NotNull] string name)
1416
{
1517
return stringLocalizer[name];
1618
}
@@ -21,7 +23,7 @@ public static LocalizedString GetString(this IStringLocalizer stringLocalizer, s
2123
/// <param name="name">The name of the string resource.</param>
2224
/// <param name="arguments">The values to format the string with.</param>
2325
/// <returns>The formatted string resource as a <see cref="LocalizedString"/>.</returns>
24-
public static LocalizedString GetString(this IStringLocalizer stringLocalizer, string name, params object[] arguments)
26+
public static LocalizedString GetString([NotNull] this IStringLocalizer stringLocalizer, [NotNull] string name, params object[] arguments)
2527
{
2628
return stringLocalizer[name, arguments];
2729
}

0 commit comments

Comments
 (0)