private bool IsKnownInterface(string interfaceName)
{
try
{
var types = _appDomainTypes ?? (_appDomainTypes = AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetTypes()));
return types
.Any(
t =>
string.Equals(t.Name, interfaceName, StringComparison.InvariantCultureIgnoreCase)
|| string.Equals(t.FullName, interfaceName));
}
catch
{
return false;
}
}
}