using System.Reflection;
using System.Text;

namespace Quadarax.Foundation.Core.Reflection.Extensions
{
    public static class AssemblyNameExt
    {
        #region *** Private Fields ***
		#endregion
		
		#region *** Public operations & overrides ***
        public static string GetPublicKeyTokenString(this AssemblyName oOwner)
        {            
            var aPkToken = oOwner.GetPublicKeyToken();
            if (aPkToken == null)
                return string.Empty;
            var oSb = new StringBuilder();
            foreach (var nPk in aPkToken)
                oSb.AppendFormat("{0:x2}", nPk);
            return oSb.ToString();
        }
		#endregion
		#region *** Private operations & overrides ***
		#endregion        
    }
}
