protected virtual string GetLicenseKey(LicenseContext context, Type type)
{
string key = null;
if (context.UsageMode == LicenseUsageMode.Runtime)
{
key = context.GetSavedLicenseKey(type, null);
}
// Try and loaded license from registry
if (key == null)
{
key = ReadKeyFromRegistry();
}
// if we're in design mode or a suitable license key wasn't found in
// the runtime context look for a .LIC file
//
if (key == null)
{
key = ReadKeyFromFile(GetLicenseFilePath(context, type));
}
return key;
}