C# Class Frapid.i18n.ResourceManager

ファイルを表示 Open project: frapid/frapid

Public Methods

Method Description
GetString ( string tenant, string resourceClass, string resourceKey, string cultureCode = null ) : string

Gets the localized resource.

TryGetResourceFromCache ( string tenant, string resourceClass, string resourceKey, string cultureCode = null ) : string

Get the localized resource without throwing an exception if the resource is not found.

Private Methods

Method Description
GetCache ( string tenant ) : string>.IDictionary
GetCulture ( string cultureCode ) : CultureInfo
InitializeResourcesAsync ( string tenant ) : System.Threading.Tasks.Task

Method Details

GetString() public static method

Gets the localized resource.
Thrown when the resource key is not found on the specified class.
public static GetString ( string tenant, string resourceClass, string resourceKey, string cultureCode = null ) : string
tenant string The name of the database or tenant.
resourceClass string The name of the resource class.
resourceKey string The resource key.
cultureCode string /// The culture of the resource. /// If this optional parameter is left empty, the current culture will be used. ///
return string

TryGetResourceFromCache() public static method

Get the localized resource without throwing an exception if the resource is not found.
public static TryGetResourceFromCache ( string tenant, string resourceClass, string resourceKey, string cultureCode = null ) : string
tenant string The name of the current tenant or database.
resourceClass string The name of the resource class.
resourceKey string The resource key.
cultureCode string /// The culture of the resource. /// If this optional parameter is left empty, the current culture will be used. ///
return string