.NET Based OPC UA Client/Server SDK  3.3.3.537
UnifiedAutomation.UaServer.ResourceManager Class Reference

An object that manages access to localized resources. More...

Inherits IDisposable, and UnifiedAutomation.UaBase.ITranslationManager.

Public Member Functions

 ResourceManager (ApplicationInstanceBase application)
 Initializes the resource manager with the server instance that owns it. More...
 
void Dispose ()
 May be called by the application to clean up resources. More...
 
virtual LocalizedText Translate (IList< string > preferredLocales, string key, string text, params object[] args)
 Translates the text and then formats it with the arguments provided. More...
 
virtual LocalizedText Translate (IList< string > preferredLocales, LocalizedText defaultText)
 Translates the LocalizedText using the information in the TranslationInfo property. More...
 
virtual StatusCode Translate (IList< string > preferredLocales, StatusCode result)
 Translates the specified preferred locales. More...
 
virtual string[] GetAvailableLocales ()
 Returns the locales supported by the resource manager. More...
 
void Add (string key, string locale, string text)
 Adds a translation to the resource manager. More...
 
void Add (string locale, IDictionary< string, string > translations)
 Adds the translations to the resource manager. More...
 
void Add (uint statusCode, string locale, string text)
 Adds the translations to the resource manager. More...
 
void Add (XmlQualifiedName symbolicId, string locale, string text)
 Adds the translations to the resource manager. More...
 
void LoadDefaultText ()
 Uses reflection to load default text for standard StatusCodes. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 Cleans up all resources held by the object. More...
 

Detailed Description

An object that manages access to localized resources.

Constructor & Destructor Documentation

UnifiedAutomation.UaServer.ResourceManager.ResourceManager ( ApplicationInstanceBase  application)

Initializes the resource manager with the server instance that owns it.

Member Function Documentation

void UnifiedAutomation.UaServer.ResourceManager.Add ( string  key,
string  locale,
string  text 
)

Adds a translation to the resource manager.

Parameters
keyThe key.
localeThe locale.
textThe text.
void UnifiedAutomation.UaServer.ResourceManager.Add ( string  locale,
IDictionary< string, string >  translations 
)

Adds the translations to the resource manager.

Parameters
localeThe locale.
translationsThe translations.
void UnifiedAutomation.UaServer.ResourceManager.Add ( uint  statusCode,
string  locale,
string  text 
)

Adds the translations to the resource manager.

Parameters
statusCodeThe status code.
localeThe locale.
textThe text.
void UnifiedAutomation.UaServer.ResourceManager.Add ( XmlQualifiedName  symbolicId,
string  locale,
string  text 
)

Adds the translations to the resource manager.

Parameters
symbolicIdThe symbolic id.
localeThe locale.
textThe 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
preferredLocalesThe list of preferred locales
keyThe key used to look up the translation
textThe text to translate
argsThe format argument
Returns
The translated text

Implements UnifiedAutomation.UaBase.ITranslationManager.

virtual LocalizedText UnifiedAutomation.UaServer.ResourceManager.Translate ( IList< string >  preferredLocales,
LocalizedText  defaultText 
)
virtual

Translates the LocalizedText using the information in the TranslationInfo property.

Parameters
preferredLocalesThe preferred locales.
defaultTextThe default text.
Returns

The translated text

Implements UnifiedAutomation.UaBase.ITranslationManager.

virtual StatusCode UnifiedAutomation.UaServer.ResourceManager.Translate ( IList< string >  preferredLocales,
StatusCode  result 
)
virtual

Translates the specified preferred locales.

Parameters
preferredLocalesThe preferred locales.
resultThe result.
Returns
The translated status code

Implements UnifiedAutomation.UaBase.ITranslationManager.


The documentation for this class was generated from the following file: