C# Class WPFLocalizeExtension.Extensions.BLoc

A localization extension based on Binding.
Inheritance: System.Windows.Data.Binding, INotifyPropertyChanged, IDictionaryEventListener, IDisposable
Mostra file Open project: SeriousM/WPFLocalizationExtension

Public Methods

Method Description
BLoc ( ) : System

Initializes a new instance of the BLoc class.

BLoc ( string key ) : System

Initializes a new instance of the BLoc class.

ClearResourceBuffer ( ) : void

Clears the common resource buffer.

Dispose ( ) : void

Removes the listener from the dictionary.

FormatOutput ( ) : object

This function returns the properly prepared output of the markup extension.

ResourceChanged ( DependencyObject sender, DictionaryEventArgs e ) : void

This method is called when the resource somehow changed.

Protected Methods

Method Description
GetForcedCultureOrDefault ( ) : CultureInfo

If Culture property defines a valid CultureInfo, a CultureInfo instance will get created and returned, otherwise LocalizeDictionary.Culture will get returned.

Private Methods

Method Description
RaisePropertyChanged ( string property ) : void

Notify that a property has changed

SafeAddItemToResourceBuffer ( string key, object item ) : void

Adds an item to the resource buffer (threadsafe).

SafeRemoveItemFromResourceBuffer ( string key ) : void

Removes an item from the resource buffer (threadsafe).

UpdateNewValue ( ) : void

Method Details

BLoc() public method

Initializes a new instance of the BLoc class.
public BLoc ( ) : System
return System

BLoc() public method

Initializes a new instance of the BLoc class.
public BLoc ( string key ) : System
key string The resource identifier.
return System

ClearResourceBuffer() public static method

Clears the common resource buffer.
public static ClearResourceBuffer ( ) : void
return void

Dispose() public method

Removes the listener from the dictionary.
public Dispose ( ) : void
return void

FormatOutput() public method

This function returns the properly prepared output of the markup extension.
public FormatOutput ( ) : object
return object

GetForcedCultureOrDefault() protected method

If Culture property defines a valid CultureInfo, a CultureInfo instance will get created and returned, otherwise LocalizeDictionary.Culture will get returned.
/// thrown if the parameter Culture don't defines a valid ///
protected GetForcedCultureOrDefault ( ) : CultureInfo
return System.Globalization.CultureInfo

ResourceChanged() public method

This method is called when the resource somehow changed.
public ResourceChanged ( DependencyObject sender, DictionaryEventArgs e ) : void
sender System.Windows.DependencyObject The sender.
e WPFLocalizeExtension.Engine.DictionaryEventArgs The event arguments.
return void