C# 클래스 WPFLocalizeExtension.Providers.ResxLocalizationProviderBase

The base for RESX file providers.
상속: System.Windows.DependencyObject, ILocalizationProvider
파일 보기 프로젝트 열기: SeriousM/WPFLocalizationExtension

보호된 프로퍼티들

프로퍼티 타입 설명
AvailableCultureListLock object
ResourceManagerList ResourceManager>.Dictionary
ResourceManagerListLock object

공개 메소드들

메소드 설명
ClearResourceManagerList ( ) : void

Clears the whole list of cached resource managers.

GetFullyQualifiedResourceKey ( String key, DependencyObject target ) : FullyQualifiedResourceKeyBase

Uses the key and target to build a fully qualified resource key (Assembly, Dictionary, Key)

GetLocalizedObject ( string key, DependencyObject target, CultureInfo culture ) : object

Get the localized object.

ParseKey ( string inKey, string &outAssembly, string &outDict, string &outKey ) : void

Parses a key ([[Assembly:]Dict:]Key and return the parts of it.

UpdateCultureList ( string resourceAssembly, string resourceDictionary ) : bool

Updates the list of available cultures using the given resource location.

보호된 메소드들

메소드 설명
Add ( string thekey, ResourceManager value ) : void

Thread-safe access to the resource manager dictionary.

AddCulture ( CultureInfo c ) : void

Thread-safe access to the AvailableCultures list.

GetAssembly ( DependencyObject target ) : string

Get the assembly from the context, if possible.

GetAssemblyName ( Assembly assembly ) : string

Returns the AssemblyName of the passed assembly instance

GetDictionary ( DependencyObject target ) : string

Get the dictionary from the context, if possible.

GetResourceManager ( string resourceAssembly, string resourceDictionary ) : ResourceManager

Looks up in the cached ResourceManager list for the searched ResourceManager.

OnProviderChanged ( DependencyObject target ) : void

Calls the ILocalizationProvider.ProviderChanged event.

OnProviderError ( DependencyObject target, string key, string message ) : void

Calls the ILocalizationProvider.ProviderError event.

OnValueChanged ( string key, object value, object tag ) : void

Calls the ILocalizationProvider.ValueChanged event.

TryGetValue ( string thekey, ResourceManager &result ) : bool

Thread-safe access to the resource manager dictionary.

TryRemove ( string thekey ) : void

Tries to remove a key from the resource manager dictionary.

비공개 메소드들

메소드 설명
GetExecutablePath ( int processId ) : string

Get the executable path for both x86 and x64 processes.

GetResourceManagerFromType ( Type type ) : ResourceManager
IsFileOfInterest ( string f, string dir ) : bool

메소드 상세

Add() 보호된 메소드

Thread-safe access to the resource manager dictionary.
protected Add ( string thekey, ResourceManager value ) : void
thekey string Key.
value System.Resources.ResourceManager Value.
리턴 void

AddCulture() 보호된 메소드

Thread-safe access to the AvailableCultures list.
protected AddCulture ( CultureInfo c ) : void
c System.Globalization.CultureInfo The CultureInfo.
리턴 void

ClearResourceManagerList() 공개 메소드

Clears the whole list of cached resource managers.
public ClearResourceManagerList ( ) : void
리턴 void

GetAssembly() 보호된 추상적인 메소드

Get the assembly from the context, if possible.
protected abstract GetAssembly ( DependencyObject target ) : string
target System.Windows.DependencyObject The target object.
리턴 string

GetAssemblyName() 보호된 메소드

Returns the AssemblyName of the passed assembly instance
protected GetAssemblyName ( Assembly assembly ) : string
assembly System.Reflection.Assembly The Assembly where to get the name from
리턴 string

GetDictionary() 보호된 추상적인 메소드

Get the dictionary from the context, if possible.
protected abstract GetDictionary ( DependencyObject target ) : string
target System.Windows.DependencyObject The target object.
리턴 string

GetFullyQualifiedResourceKey() 공개 메소드

Uses the key and target to build a fully qualified resource key (Assembly, Dictionary, Key)
public GetFullyQualifiedResourceKey ( String key, DependencyObject target ) : FullyQualifiedResourceKeyBase
key String Key used as a base to find the full key
target System.Windows.DependencyObject Target used to help determine key information
리턴 FullyQualifiedResourceKeyBase

GetLocalizedObject() 공개 메소드

Get the localized object.
public GetLocalizedObject ( string key, DependencyObject target, CultureInfo culture ) : object
key string The key to the value.
target System.Windows.DependencyObject The target object.
culture System.Globalization.CultureInfo The culture to use.
리턴 object

GetResourceManager() 보호된 메소드

Looks up in the cached ResourceManager list for the searched ResourceManager.
/// If the ResourceManagers cannot be looked up /// /// If the searched wasn't found ///
protected GetResourceManager ( string resourceAssembly, string resourceDictionary ) : ResourceManager
resourceAssembly string The resource assembly.
resourceDictionary string The dictionary to look up.
리턴 System.Resources.ResourceManager

OnProviderChanged() 보호된 메소드

Calls the ILocalizationProvider.ProviderChanged event.
protected OnProviderChanged ( DependencyObject target ) : void
target System.Windows.DependencyObject The target object.
리턴 void

OnProviderError() 보호된 메소드

Calls the ILocalizationProvider.ProviderError event.
protected OnProviderError ( DependencyObject target, string key, string message ) : void
target System.Windows.DependencyObject The target object.
key string The key.
message string The error message.
리턴 void

OnValueChanged() 보호된 메소드

Calls the ILocalizationProvider.ValueChanged event.
protected OnValueChanged ( string key, object value, object tag ) : void
key string The key where the value was changed.
value object The new value.
tag object A custom tag.
리턴 void

ParseKey() 공개 정적인 메소드

Parses a key ([[Assembly:]Dict:]Key and return the parts of it.
public static ParseKey ( string inKey, string &outAssembly, string &outDict, string &outKey ) : void
inKey string The key to parse.
outAssembly string The found or default assembly.
outDict string The found or default dictionary.
outKey string The found or default key.
리턴 void

TryGetValue() 보호된 메소드

Thread-safe access to the resource manager dictionary.
protected TryGetValue ( string thekey, ResourceManager &result ) : bool
thekey string Key.
result System.Resources.ResourceManager Value.
리턴 bool

TryRemove() 보호된 메소드

Tries to remove a key from the resource manager dictionary.
protected TryRemove ( string thekey ) : void
thekey string Key.
리턴 void

UpdateCultureList() 공개 메소드

Updates the list of available cultures using the given resource location.
public UpdateCultureList ( string resourceAssembly, string resourceDictionary ) : bool
resourceAssembly string The resource assembly.
resourceDictionary string The dictionary to look up.
리턴 bool

프로퍼티 상세

AvailableCultureListLock 보호되어 있는 프로퍼티

Lock object for concurrent access to the available culture list.
protected object AvailableCultureListLock
리턴 object

ResourceManagerList 보호되어 있는 프로퍼티

Gets the used ResourceManagers with their corresponding namespaces.
protected Dictionary ResourceManagerList
리턴 ResourceManager>.Dictionary

ResourceManagerListLock 보호되어 있는 프로퍼티

Lock object for concurrent access to the resource manager list.
protected object ResourceManagerListLock
리턴 object