var varSet = Session.GetVariableSetByName("UserSettings");
if (varSet == null)
{
varSet = Globals.Session.CreateVariableSet("UserSettings");
}
try
{
Globals.Session.CreateGlobalVariable(paramId, settingsJsonString);
}
catch (Exception)
{
// TRY TO CHANGE
var userVariables = varSet[ObjectPropertyNames.Variables] as IList<ObjectProxy>;
foreach (var userVar in userVariables)
{
if (userVar.GetDisplayName() == Globals.Session.GetCurrentUser().LoginName)
{
// WHAT TO DO ?
}
}
}