C# Класс Lucene.Net.QueryParsers.Flexible.Messages.NLS

MessageBundles classes extend this class, to implement a bundle. For Native Language Support (NLS), system of software internationalization. This interface is similar to the NLS class in eclipse.osgi.util.NLS class - initializeMessages() method resets the values of all static strings, should only be called by classes that extend from NLS (see TestMessages.java for reference) - performs validation of all message in a bundle, at class load time - performs per message validation at runtime - see NLSTest.java for usage reference MessageBundle classes may subclass this type.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetLocalizedMessage ( string key ) : string
GetLocalizedMessage ( string key, CultureInfo locale ) : string
GetResourceManagerFactory ( ) : IResourceManagerFactory

Gets the static IResourceManagerFactory instance responsible for creating ResourceManager instances in this class. LUCENENET specific.

SetResourceManagerFactory ( IResourceManagerFactory resourceManagerFactory ) : void

Sets the IResourceManagerFactory used to create instances of ResourceManager for retrieving localized resources. Defaults to BundleResourceManagerFactory if not set. LUCENENET specific.

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

Метод Описание
InitializeMessages ( string bundleName, Type clazz ) : void

Initialize a given class with the message bundle Keys Should be called from a class that extends NLS in a static block at class load time.

NLS ( ) : Lucene.Net.Support

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

Метод Описание
GetResourceBundleObject ( string messageKey, CultureInfo locale ) : object
Load ( Type clazz ) : void
LoadFieldValue ( FieldInfo field, Type clazz ) : void
ValidateMessage ( string key, Type clazz ) : void

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

GetLocalizedMessage() публичный статический Метод

public static GetLocalizedMessage ( string key ) : string
key string
Результат string

GetLocalizedMessage() публичный статический Метод

public static GetLocalizedMessage ( string key, CultureInfo locale ) : string
key string
locale System.Globalization.CultureInfo
Результат string

GetResourceManagerFactory() публичный статический Метод

Gets the static IResourceManagerFactory instance responsible for creating ResourceManager instances in this class. LUCENENET specific.
public static GetResourceManagerFactory ( ) : IResourceManagerFactory
Результат IResourceManagerFactory

InitializeMessages() защищенный статический Метод

Initialize a given class with the message bundle Keys Should be called from a class that extends NLS in a static block at class load time.
protected static InitializeMessages ( string bundleName, Type clazz ) : void
bundleName string Property file with that contains the message bundle
clazz System.Type where constants will reside
Результат void

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

protected NLS ( ) : Lucene.Net.Support
Результат Lucene.Net.Support

SetResourceManagerFactory() публичный статический Метод

Sets the IResourceManagerFactory used to create instances of ResourceManager for retrieving localized resources. Defaults to BundleResourceManagerFactory if not set. LUCENENET specific.
public static SetResourceManagerFactory ( IResourceManagerFactory resourceManagerFactory ) : void
resourceManagerFactory IResourceManagerFactory The instance. Cannot be null.
Результат void