Ejemplo n.º 1
0
 internal static ConfigurationPropertyBag BuildPropertyBag(string appName)
 {
     try
     {
         SSOConfigStore           ssoStore   = new SSOConfigStore();
         ConfigurationPropertyBag appMgmtBag = new ConfigurationPropertyBag();
         ((ISSOConfigStore)ssoStore).GetConfigInfo(appName, idenifierGUID, SSOFlag.SSO_FLAG_RUNTIME, (IPropertyBag)appMgmtBag);
         return(appMgmtBag);
     }
     catch (Exception e)
     {
         System.Diagnostics.Trace.WriteLine(e.Message);
         throw;
     }
 }
Ejemplo n.º 2
0
 /// <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>
 private 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;
     }
 }