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.
파일 보기 프로젝트 열기: apache/lucenenet 1 사용 예제들

공개 메소드들

메소드 설명
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