public string[] GetValues(string appName) { string[] result; try { SSOPropertyBag sSOPropertyBag = new SSOPropertyBag(); ISSOConfigStore iSSOConfigStore = (ISSOConfigStore) new SSOConfigStore(); iSSOConfigStore.GetConfigInfo(appName, SSO.CONFIG_NAME, 4, sSOPropertyBag); string[] array = new string[sSOPropertyBag.Dictionary.Count]; int num = 0; foreach (KeyValuePair <string, object> current in sSOPropertyBag.Dictionary) { array[num] = current.Value.ToString(); num++; } result = array; } catch (Exception ex) { DoSsoEvent("SSO Helper - GetValues", ex.Message, true); result = new string[] { "" }; } return(result); }
public void GetKeyValues(string appName, Dictionary <string, string> dict) { try { SSOPropertyBag properties = new SSOPropertyBag(); ((ISSOConfigStore) new SSOConfigStore()).GetConfigInfo(appName, CONFIG_NAME, 4, properties); foreach (KeyValuePair <string, object> pair in properties.Dictionary) { dict.Add(pair.Key, pair.Value.ToString()); } } catch (Exception exception) { EventLog.WriteEntry("SSO Helper - GetKeyValues", exception.Message); } }
public void SaveApplicationData(string appName, string[] arrKeys, string[] arrValues) { try { int num = arrKeys.Length; SSOPropertyBag sSOPropertyBag = new SSOPropertyBag(); for (int i = 0; i < num; i++) { sSOPropertyBag.SetValue <string>(arrKeys[i], arrValues[i]); DoSsoEvent("SaveApplicationData", string.Format("Key={0}, Value={1}", arrKeys[i], arrValues[i]), false); } ISSOConfigStore iSSOConfigStore = (ISSOConfigStore) new SSOConfigStore(); iSSOConfigStore.SetConfigInfo(appName, SSO.CONFIG_NAME, sSOPropertyBag); } catch (Exception ex) { DoSsoEvent("SSO Helper - SaveApplicationData", ex.Message, true); } }