An object that manages access to localized resources.
More...
Inherits IDisposable, and UnifiedAutomation.UaBase.ITranslationManager.
|
| ResourceManager (ApplicationInstance application) |
| Initializes the resource manager with the server instance that owns it.
|
|
void | Dispose () |
| May be called by the application to clean up resources.
|
|
virtual LocalizedText | Translate (IList< string > preferredLocales, string key, string text, params object[] args) |
| Translates the text and then formats it with the arguments provided.
|
|
LocalizedText | Translate (IList< string > preferredLocales, LocalizedText defaultText) |
| Translates the LocalizedText using the information in the TranslationInfo property.
|
|
StatusCode | Translate (IList< string > preferredLocales, StatusCode result) |
| Translates the specified preferred locales.
|
|
virtual string[] | GetAvailableLocales () |
| Returns the locales supported by the resource manager.
|
|
void | Add (string key, string locale, string text) |
| Adds a translation to the resource manager.
|
|
void | Add (string locale, IDictionary< string, string > translations) |
| Adds the translations to the resource manager.
|
|
void | Add (uint statusCode, string locale, string text) |
| Adds the translations to the resource manager.
|
|
void | Add (XmlQualifiedName symbolicId, string locale, string text) |
| Adds the translations to the resource manager.
|
|
void | LoadDefaultText () |
| Uses reflection to load default text for standard StatusCodes.
|
|
LocalizedText | Translate (IList< string > preferredLocales, string key, string text, params object[] args) |
| Translates the text and then formats it with the arguments provided.
|
|
LocalizedText | Translate (IList< string > preferredLocales, LocalizedText text) |
| Translates the LocalizedText using the information in the TranslationInfo property.
|
|
StatusCode | Translate (IList< string > preferredLocales, StatusCode result) |
| Translates a service code.
|
|
|
virtual void | Dispose (bool disposing) |
| Cleans up all resources held by the object.
|
|
An object that manages access to localized resources.
Initializes the resource manager with the server instance that owns it.
void UnifiedAutomation.UaServer.ResourceManager.Add |
( |
string |
key, |
|
|
string |
locale, |
|
|
string |
text |
|
) |
| |
Adds a translation to the resource manager.
- Parameters
-
key | The key. |
locale | The locale. |
text | The text. |
void UnifiedAutomation.UaServer.ResourceManager.Add |
( |
string |
locale, |
|
|
IDictionary< string, string > |
translations |
|
) |
| |
Adds the translations to the resource manager.
- Parameters
-
locale | The locale. |
translations | The translations. |
void UnifiedAutomation.UaServer.ResourceManager.Add |
( |
uint |
statusCode, |
|
|
string |
locale, |
|
|
string |
text |
|
) |
| |
Adds the translations to the resource manager.
- Parameters
-
statusCode | The status code. |
locale | The locale. |
text | The text. |
void UnifiedAutomation.UaServer.ResourceManager.Add |
( |
XmlQualifiedName |
symbolicId, |
|
|
string |
locale, |
|
|
string |
text |
|
) |
| |
Adds the translations to the resource manager.
- Parameters
-
symbolicId | The symbolic id. |
locale | The locale. |
text | The text. |
void UnifiedAutomation.UaServer.ResourceManager.Dispose |
( |
| ) |
|
May be called by the application to clean up resources.
virtual void UnifiedAutomation.UaServer.ResourceManager.Dispose |
( |
bool |
disposing | ) |
|
|
protectedvirtual |
Cleans up all resources held by the object.
virtual string [] UnifiedAutomation.UaServer.ResourceManager.GetAvailableLocales |
( |
| ) |
|
|
virtual |
Returns the locales supported by the resource manager.
- Returns
- The available locales
void UnifiedAutomation.UaServer.ResourceManager.LoadDefaultText |
( |
| ) |
|
Uses reflection to load default text for standard StatusCodes.
virtual LocalizedText UnifiedAutomation.UaServer.ResourceManager.Translate |
( |
IList< string > |
preferredLocales, |
|
|
string |
key, |
|
|
string |
text, |
|
|
params object[] |
args |
|
) |
| |
|
virtual |
Translates the text and then formats it with the arguments provided.
- Parameters
-
preferredLocales | The list of preferred locales |
key | The key used to look up the translation |
text | The text to translate |
args | The format argumente |
- Returns
- The translated text
LocalizedText UnifiedAutomation.UaServer.ResourceManager.Translate |
( |
IList< string > |
preferredLocales, |
|
|
LocalizedText |
defaultText |
|
) |
| |
Translates the LocalizedText using the information in the TranslationInfo property.
- Parameters
-
preferredLocales | The preferred locales. |
defaultText | The default text. |
- Returns
-
The translated text
StatusCode UnifiedAutomation.UaServer.ResourceManager.Translate |
( |
IList< string > |
preferredLocales, |
|
|
StatusCode |
result |
|
) |
| |
Translates the specified preferred locales.
- Parameters
-
preferredLocales | The preferred locales. |
result | The result. |
- Returns
- The translated status code
The documentation for this class was generated from the following file:
- C:/work/uasdknet/src/UaServer/ResourceManager.cs