Interface IErrorLocalizer
Turns an Error into a message for users in one language. Used once, at the edge (API response, UI); library code never localizes.
Namespace: ZhEaIsNsAaBn.Utilities
Assembly: ZhEaIsNsAaBn.LayerResponse.dll
Syntax
public interface IErrorLocalizer
Methods
Localize(Error)
The message in CurrentUICulture (set per request by request localization).
Declaration
LocalizedMessage Localize(Error error)
Parameters
| Type | Name | Description |
|---|---|---|
| Error | error | The error. |
Returns
| Type | Description |
|---|---|
| LocalizedMessage | The message and the locale it is really in. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
Localize(Error, CultureInfo)
The message in culture, falling back to its parent cultures, then English.
Declaration
LocalizedMessage Localize(Error error, CultureInfo culture)
Parameters
| Type | Name | Description |
|---|---|---|
| Error | error | The error. |
| CultureInfo | culture | The wanted culture, e.g. |
Returns
| Type | Description |
|---|---|
| LocalizedMessage | The message and the locale it is really in. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|