/// <summary>
        /// Attaches the license.
        /// </summary>
        /// <param name="assembly">The assembly.</param>
        /// <param name="licenseAttribute">The license attribute.</param>
        public static void AttachLicense(Assembly assembly, BeyovaLicenseAttribute licenseAttribute)
        {
            if (assembly != null && licenseAttribute != null)
            {
                string assemblyName = assembly.GetName().Name;

                if (licenses.ContainsKey(assemblyName))
                {
                    return;
                }

                var license = licenseAttribute.ReadBeyovaLicense();

                if (license != null)
                {
                    licenses.Add(assemblyName, license);
                }
                else
                {
                    if (licenseAttribute.IsRequired)
                    {
                        throw new InvalidLicenseException(assemblyName);
                    }
                }
            }
        }