/// <summary> Initialize a given class with the message bundle Keys Should be called from /// a class that extends NLS in a static block at class load time. /// /// </summary> /// <param name="bundleName">Property file with that contains the message bundle /// </param> /// <param name="clazz">where constants will reside /// </param> //@SuppressWarnings("unchecked") protected internal static void InitializeMessages(System.String bundleName, System.Type clazz) { try { Load(clazz); if (!bundles.ContainsKey(bundleName)) { bundles[bundleName] = clazz; } } catch (System.Exception e) { // ignore all errors and exceptions // because this function is supposed to be called at class load time. } }