C# Class 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.
Afficher le fichier Open project: apache/lucenenet Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
GetResourceBundleObject ( string messageKey, CultureInfo locale ) : object
Load ( Type clazz ) : void
LoadFieldValue ( FieldInfo field, Type clazz ) : void
ValidateMessage ( string key, Type clazz ) : void

Method Details

GetLocalizedMessage() public static méthode

public static GetLocalizedMessage ( string key ) : string
key string
Résultat string

GetLocalizedMessage() public static méthode

public static GetLocalizedMessage ( string key, CultureInfo locale ) : string
key string
locale System.Globalization.CultureInfo
Résultat string

GetResourceManagerFactory() public static méthode

Gets the static IResourceManagerFactory instance responsible for creating ResourceManager instances in this class. LUCENENET specific.
public static GetResourceManagerFactory ( ) : IResourceManagerFactory
Résultat IResourceManagerFactory

InitializeMessages() protected static méthode

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
Résultat void

NLS() protected méthode

protected NLS ( ) : Lucene.Net.Support
Résultat Lucene.Net.Support

SetResourceManagerFactory() public static méthode

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.
Résultat void