C# Class WPFLocalizeExtension.Providers.CSVLocalizationProviderBase

The base for CSV file providers.
Inheritance: System.Windows.DependencyObject, ILocalizationProvider
Afficher le fichier Open project: SeriousM/WPFLocalizationExtension

Protected Properties

Свойство Type Description
AvailableCultureListLock object
ResourceManagerList ResourceManager>.Dictionary
ResourceManagerListLock object

Méthodes publiques

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

Méthodes protégées

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

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.

Method Details

AddCulture() protected méthode

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

GetAssembly() protected abstract méthode

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

GetAssemblyName() protected méthode

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

GetDictionary() protected abstract méthode

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

GetFullyQualifiedResourceKey() public méthode

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

GetLocalizedObject() public méthode

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

OnProviderChanged() protected méthode

Calls the ILocalizationProvider.ProviderChanged event.
protected OnProviderChanged ( DependencyObject target ) : void
target System.Windows.DependencyObject The target object.
Résultat void

OnProviderError() protected méthode

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

OnValueChanged() protected méthode

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

ParseKey() public static méthode

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

Property Details

AvailableCultureListLock protected_oe property

Lock object for concurrent access to the available culture list.
protected object AvailableCultureListLock
Résultat object

ResourceManagerList protected_oe property

Gets the used ResourceManagers with their corresponding namespaces.
protected Dictionary ResourceManagerList
Résultat ResourceManager>.Dictionary

ResourceManagerListLock protected_oe property

Lock object for concurrent access to the resource manager list.
protected object ResourceManagerListLock
Résultat object