protected override object[] BuildLookupData(string name, out DextopSessionVariableSharing sharing) { switch (name) { case "OnOff": sharing = DextopSessionVariableSharing.Global; return(new[] { new object[] { true, "On" }, new object[] { false, "Off" } }); } return(base.BuildLookupData(name, out sharing)); }
protected override object[] BuildLookupData(string name, out DextopSessionVariableSharing sharing) { switch (name) { case "OnOff": sharing = DextopSessionVariableSharing.Global; return new[] { new object[] { true, "On" }, new object[] { false, "Off" } }; } return base.BuildLookupData(name, out sharing); }
/// <summary> /// Sets the session variable. /// </summary> /// <param name="sessionVariableName">Name of the session variable.</param> /// <param name="value">The value.</param> /// <param name="sharing">The sharing mode.</param> public void SetVariable(string sessionVariableName, object value, DextopSessionVariableSharing sharing) { switch (sharing) { case DextopSessionVariableSharing.Global: SetGlobalVariable(sessionVariableName, value); break; case DextopSessionVariableSharing.Culture: SetLocalizedVariable(sessionVariableName, value); break; case DextopSessionVariableSharing.None: SetVariable(sessionVariableName, value); break; } }
/// <summary> /// Builds the lookup data. /// </summary> /// <param name="lookupName">The lookup name.</param> /// <param name="sharing">The sharing mode.</param> /// <returns>The lookup data.</returns> protected virtual object[] BuildLookupData(String lookupName, out DextopSessionVariableSharing sharing) { throw new DextopException("Shared lookup data '{0}' is not registered.", lookupName); }
void SetLookupData(String name, LookupData data, DextopSessionVariableSharing sharing) { SetVariable(GetLookupDataKey(name), data, sharing); }