StringLocalizerExtensions.GetString 方法

定义

重载

GetString(IStringLocalizer, String)

获取具有给定名称的字符串资源。

GetString(IStringLocalizer, String, Object[])

获取具有给定名称并通过提供的参数进行格式设置的字符串资源。

GetString(IStringLocalizer, String)

Source:
StringLocalizerExtensions.cs
Source:
StringLocalizerExtensions.cs
Source:
StringLocalizerExtensions.cs
Source:
StringLocalizerExtensions.cs
Source:
StringLocalizerExtensions.cs

获取具有给定名称的字符串资源。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Localization::LocalizedString ^ GetString(Microsoft::Extensions::Localization::IStringLocalizer ^ stringLocalizer, System::String ^ name);
public static Microsoft.Extensions.Localization.LocalizedString GetString (this Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer, string name);
static member GetString : Microsoft.Extensions.Localization.IStringLocalizer * string -> Microsoft.Extensions.Localization.LocalizedString
<Extension()>
Public Function GetString (stringLocalizer As IStringLocalizer, name As String) As LocalizedString

参数

name
String

字符串资源的名称。

返回

作为 LocalizedString 的字符串资源。

适用于

GetString(IStringLocalizer, String, Object[])

Source:
StringLocalizerExtensions.cs
Source:
StringLocalizerExtensions.cs
Source:
StringLocalizerExtensions.cs
Source:
StringLocalizerExtensions.cs
Source:
StringLocalizerExtensions.cs

获取具有给定名称并通过提供的参数进行格式设置的字符串资源。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Localization::LocalizedString ^ GetString(Microsoft::Extensions::Localization::IStringLocalizer ^ stringLocalizer, System::String ^ name, ... cli::array <System::Object ^> ^ arguments);
public static Microsoft.Extensions.Localization.LocalizedString GetString (this Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer, string name, params object[] arguments);
static member GetString : Microsoft.Extensions.Localization.IStringLocalizer * string * obj[] -> Microsoft.Extensions.Localization.LocalizedString
<Extension()>
Public Function GetString (stringLocalizer As IStringLocalizer, name As String, ParamArray arguments As Object()) As LocalizedString

参数

name
String

字符串资源的名称。

arguments
Object[]

用于设置字符串格式的值。

返回

作为 LocalizedString 的格式化字符串资源。

适用于