Ejemplo n.º 1
0
        /// <summary>
        /// Load a string from the common properties list. Returns empty string if name does not exist
        /// </summary>
        /// <param name="name">Name of the property to retrieve</param>
        /// <param name="webApp"></param>
        /// <returns>Value corresponding to Name. Empty string if not found</returns>
        public static string Load(string name, SPWebApplication webApp)
        {
            return(FarmPropertyBag.Load(name));

            //if (_properties == null)
            //{
            //    ReloadProperties(webApp);
            //}

            //ConfigurationProperty prop = _properties[name];
            //if (prop == null)
            //{
            //    return "";
            //}
            //else
            //{
            //    return prop.DefaultValue.ToString();
            //}
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Load and decrypt an encrypted string from the common properties list. Pass in the web applicaton
 /// Note: this is used mainly for testing in the Common Properties Maintenance applicatoin. If you
 /// have a SharePoint context, use the version that doesn't require a webApp parameter.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="webApp"></param>
 /// <returns></returns>
 public static string LoadEncryptedString(string name, SPWebApplication webApp)
 {
     //return DecryptString(Load(name, webApp), webApp);
     return(DecryptString(FarmPropertyBag.Load(name), webApp));
 }
Ejemplo n.º 3
0
        // private static ConfigurationPropertyCollection _properties = null;

        public static string Load(string name)
        {
            return(FarmPropertyBag.Load(name));
        }