Interviewer - Server Admin > Customizing UNICOM Intelligence Interviewer - Server Admin > Adding activities to UNICOM Intelligence Interviewer - Server Admin > Common tasks in activity development > Accessing texts in a public resources file
 
Accessing texts in a public resources file
The following code illustrates how an activity can access texts in its public resources file.
The PublicResourcesManager object automatically looks for localized versions of the public resources file. For more information about localization, see Public resources file.
using SPSSMR.Resources; // defined in DimensionNet.dll
using SPSSMR.Constants; // defined in SPSSMR.Constants.dll
// used for PropertyNames constants
...

string sResxFolder =
(string) oMyAppSettings.Item(PropertyNames.PublicResourceFolder).Value;
string sResxFileName =
(string) oMyAppSettings.Item(PropertyNames.PublicResourceFileName).Value;

// get the physical folder name from the activity's Request collection
string sFolderName = Request.MapPath(sResxFolder, "", true);

PublicResourcesManager prm = new PublicResourcesManager(sFolderName, sResxFileName);

string sDisplayName = prm.GetString("ActivityDisplayName");
string sDescription = prm.GetString("Description");
See also
Public resources file
Common tasks in activity development