public static string Read(string appName, string propName) { try { SSOConfigStore ssoConfigStore = new SSOConfigStore(); ConfigurationPropertyBag configurationPropertyBag = new ConfigurationPropertyBag(); ((ISSOConfigStore)ssoConfigStore).GetConfigInfo(appName, SSOConfigHelper.idenifierGUID, 4, (IPropertyBag)configurationPropertyBag); object ptrVar = (object)null; configurationPropertyBag.Read(propName, out ptrVar, 0); return((string)ptrVar); } catch (Exception ex) { Trace.WriteLine(ex.Message); throw; } }
/// <summary> /// Read method helps get configuration data /// </summary> /// <param name="appName">The name of the affiliate application to represent the configuration container to access</param> /// <param name="propName">The property name to read</param> /// <returns> /// The value of the property stored in the given affiliate application of this component. /// </returns> public static string Read(string appName, string propName) { try { SSOConfigStore ssoStore = new SSOConfigStore(); ConfigurationPropertyBag appMgmtBag = new ConfigurationPropertyBag(); ((ISSOConfigStore)ssoStore).GetConfigInfo(appName, idenifierGUID, SSOFlag.SSO_FLAG_RUNTIME, (IPropertyBag)appMgmtBag); object propertyValue = null; appMgmtBag.Read(propName, out propertyValue, 0); return((string)propertyValue); } catch (Exception e) { System.Diagnostics.Trace.WriteLine(e.Message); throw; } }