C# Class Serenity.Localization.NestedLocalTextRegistration

Contains helper methods for registration of local texts in nested static classes. Nested static contains LocalText objects with actual translations as keys. This class locates them (with NestedLocalTextsAttribute at outermost class), determines keys by path from outermost to nested class name, replaces existing LocalText instance with a InitializedLocalText instance containing this generated key and initial translation, and registers this translation in ILocalTextRegistry provider.
Exibir arquivo Open project: volkanceylan/Serenity

Public Methods

Method Description
AddNestedTexts ( this registry, IEnumerable assemblies = null ) : void

Adds translations from static nested local text classes marked with NestedLocalTextAttribute.

Initialize ( IEnumerable assemblies, ILocalTextRegistry registry = null ) : void

Private Methods

Method Description
Initialize ( ILocalTextRegistry registry, Type type, string languageID, string prefix ) : void

Method Details

AddNestedTexts() public static method

Adds translations from static nested local text classes marked with NestedLocalTextAttribute.
public static AddNestedTexts ( this registry, IEnumerable assemblies = null ) : void
registry this
assemblies IEnumerable
return void

Initialize() public static method

public static Initialize ( IEnumerable assemblies, ILocalTextRegistry registry = null ) : void
assemblies IEnumerable
registry ILocalTextRegistry
return void