SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
erminas.SmartAPI.Utils.LanguageContext Class Reference

Utility class to execute code in a specific language variant and restore the original selection of the language variant afterwards. More...

+ Inheritance diagram for erminas.SmartAPI.Utils.LanguageContext:
+ Collaboration diagram for erminas.SmartAPI.Utils.LanguageContext:

Public Member Functions

 LanguageContext (ILanguageVariant lang)
 Selects a language variant and restores the previously selected language variant on dispose.
 
 LanguageContext (IProject project)
 Just restores the language context on dispose. Does not set a specific language variant on construction.
 
void Dispose ()
 

Detailed Description

Utility class to execute code in a specific language variant and restore the original selection of the language variant afterwards.

project.LanguageVariants["ENG"].Select(); ... using(new LanguageContext(project.LanguageVariants["DEU"])) { //the following code is executed with the German language variant selected ... } //the following code is executed with the UK English language variant selected ...

Definition at line 27 of file LanguageContext.cs.

Constructor & Destructor Documentation

erminas.SmartAPI.Utils.LanguageContext.LanguageContext ( ILanguageVariant  lang)

Selects a language variant and restores the previously selected language variant on dispose.

Parameters
lang

Definition at line 35 of file LanguageContext.cs.

+ Here is the call graph for this function:

erminas.SmartAPI.Utils.LanguageContext.LanguageContext ( IProject  project)

Just restores the language context on dispose. Does not set a specific language variant on construction.

Definition at line 45 of file LanguageContext.cs.

Member Function Documentation

void erminas.SmartAPI.Utils.LanguageContext.Dispose ( )

Definition at line 52 of file LanguageContext.cs.

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: