Add missing [NotNull] attributes on StringLocalizerExtensions
This commit is contained in:
parent
cda137ca9f
commit
6abeff9f09
|
|
@ -1,6 +1,8 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using Microsoft.Framework.Internal;
|
||||||
|
|
||||||
namespace Microsoft.Framework.Localization
|
namespace Microsoft.Framework.Localization
|
||||||
{
|
{
|
||||||
public static class StringLocalizerExtensions
|
public static class StringLocalizerExtensions
|
||||||
|
|
@ -10,7 +12,7 @@ namespace Microsoft.Framework.Localization
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">The name of the string resource.</param>
|
/// <param name="name">The name of the string resource.</param>
|
||||||
/// <returns>The string resource as a <see cref="LocalizedString"/>.</returns>
|
/// <returns>The string resource as a <see cref="LocalizedString"/>.</returns>
|
||||||
public static LocalizedString GetString(this IStringLocalizer stringLocalizer, string name)
|
public static LocalizedString GetString([NotNull] this IStringLocalizer stringLocalizer, [NotNull] string name)
|
||||||
{
|
{
|
||||||
return stringLocalizer[name];
|
return stringLocalizer[name];
|
||||||
}
|
}
|
||||||
|
|
@ -21,7 +23,7 @@ namespace Microsoft.Framework.Localization
|
||||||
/// <param name="name">The name of the string resource.</param>
|
/// <param name="name">The name of the string resource.</param>
|
||||||
/// <param name="arguments">The values to format the string with.</param>
|
/// <param name="arguments">The values to format the string with.</param>
|
||||||
/// <returns>The formatted string resource as a <see cref="LocalizedString"/>.</returns>
|
/// <returns>The formatted string resource as a <see cref="LocalizedString"/>.</returns>
|
||||||
public static LocalizedString GetString(this IStringLocalizer stringLocalizer, string name, params object[] arguments)
|
public static LocalizedString GetString([NotNull] this IStringLocalizer stringLocalizer, [NotNull] string name, params object[] arguments)
|
||||||
{
|
{
|
||||||
return stringLocalizer[name, arguments];
|
return stringLocalizer[name, arguments];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue