using System;
using System.Resources;

namespace Microsoft.RFIDLab.EPCISDemo.Common
{
	/// <summary>
	/// Summary description for Common.
	/// </summary>
	public class ExceptionManager
	{
		/// <summary>
		/// Get error message from resource file
		/// </summary>
		/// <param name="errorKey">Key for error message</param>
		/// <returns>Error Message</returns>
		public static string GetErrorMessage(string errorKey)
		{
			ResourceManager rm = new 
				ResourceManager("Microsoft.RFIDLab.EPCISDemo.Common.ExceptionMessages", System.Reflection.Assembly.GetExecutingAssembly());
			return rm.GetString(errorKey);
		}

		/// <summary>
		/// Get alert message from resource file
		/// </summary>
		/// <param name="errorKey">Key for alert message</param>
		/// <returns>Alert Message</returns>
		public static string GetAlertMessage(string alertKey)
		{
			ResourceManager rm = new 
				ResourceManager("Microsoft.RFIDLab.EPCISDemo.Common.AlertMessages", System.Reflection.Assembly.GetExecutingAssembly());
			return rm.GetString(alertKey);
		}
	}
}
