C# Класс Opc.Ua.Server.ResourceManager

An object that manages access to localized resources.
Наследование: IDisposable, ITranslationManager
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Add ( XmlQualifiedName symbolicId, string locale, string text ) : void

Adds the translations to the resource manager.

Add ( string locale, string>.IDictionary translations ) : void

Adds the translations to the resource manager.

Add ( string key, string locale, string text ) : void

Adds a translation to the resource manager.

Add ( uint statusCode, string locale, string text ) : void

Adds the translations to the resource manager.

Dispose ( ) : void

May be called by the application to clean up resources.

GetAvailableLocales ( ) : string[]

Returns the locales supported by the resource manager.

LoadDefaultText ( ) : void

Uses reflection to load default text for standard StatusCodes.

ResourceManager ( IServerInternal server, ApplicationConfiguration configuration ) : System

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

Translate ( IList preferredLocales, LocalizedText text ) : LocalizedText
Translate ( IList preferredLocales, string key, string text ) : LocalizedText
Translate ( IList preferredLocales, ServiceResult result ) : ServiceResult

Translates a service result.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Cleans up all resources held by the object.

Translate ( IList preferredLocales, LocalizedText defaultText, TranslationInfo info ) : LocalizedText

Translates the text provided.

Приватные методы

Метод Описание
FindBestTranslation ( IList preferredLocales, string key, CultureInfo &culture ) : string

Finds the best translation for the requested locales.

GetAvailableLocales ( IEnumerable preferredLocales ) : string[]
GetTable ( string locale ) : TranslationTable

Finds the translation table for the locale. Creates a new table if it does not exist.

GetText ( IList preferredLocales, string textId, string defaultText ) : LocalizedText
GetTextForLocale ( string locale, string textId, string defaultText ) : string
TranslateStatusCode ( IList preferredLocales, StatusCode statusCode, object args ) : LocalizedText

Translates a status code.

TranslateSymbolicId ( IList preferredLocales, string symbolicId, string namespaceUri, object args ) : LocalizedText

Translates a symbolic id.

Описание методов

Add() публичный Метод

Adds the translations to the resource manager.
public Add ( XmlQualifiedName symbolicId, string locale, string text ) : void
symbolicId System.Xml.XmlQualifiedName
locale string
text string
Результат void

Add() публичный Метод

Adds the translations to the resource manager.
public Add ( string locale, string>.IDictionary translations ) : void
locale string
translations string>.IDictionary
Результат void

Add() публичный Метод

Adds a translation to the resource manager.
public Add ( string key, string locale, string text ) : void
key string
locale string
text string
Результат void

Add() публичный Метод

Adds the translations to the resource manager.
public Add ( uint statusCode, string locale, string text ) : void
statusCode uint
locale string
text string
Результат void

Dispose() публичный Метод

May be called by the application to clean up resources.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Cleans up all resources held by the object.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

GetAvailableLocales() публичный Метод

Returns the locales supported by the resource manager.
public GetAvailableLocales ( ) : string[]
Результат string[]

LoadDefaultText() публичный Метод

Uses reflection to load default text for standard StatusCodes.
public LoadDefaultText ( ) : void
Результат void

ResourceManager() публичный Метод

Initializes the resource manager with the server instance that owns it.
public ResourceManager ( IServerInternal server, ApplicationConfiguration configuration ) : System
server IServerInternal
configuration ApplicationConfiguration
Результат System

Translate() публичный Метод

public Translate ( IList preferredLocales, LocalizedText text ) : LocalizedText
preferredLocales IList
text LocalizedText
Результат LocalizedText

Translate() защищенный Метод

Translates the text provided.
protected Translate ( IList preferredLocales, LocalizedText defaultText, TranslationInfo info ) : LocalizedText
preferredLocales IList
defaultText LocalizedText
info TranslationInfo
Результат LocalizedText

Translate() публичный Метод

public Translate ( IList preferredLocales, string key, string text ) : LocalizedText
preferredLocales IList
key string
text string
Результат LocalizedText

Translate() публичный Метод

Translates a service result.
public Translate ( IList preferredLocales, ServiceResult result ) : ServiceResult
preferredLocales IList
result ServiceResult
Результат ServiceResult