mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-07-03 19:41:54 +02:00
Add additional try-catch to TypeLoader logic (#1352)
This commit is contained in:
@@ -118,6 +118,8 @@ internal static class TypeLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static bool TryGetImplementationTypeByInterfaceAndOptionalFullName<T>(Assembly assembly, string? implementationTypeFullName, [NotNullWhen(true)] out Type? type)
|
private static bool TryGetImplementationTypeByInterfaceAndOptionalFullName<T>(Assembly assembly, string? implementationTypeFullName, [NotNullWhen(true)] out Type? type)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
type = assembly
|
type = assembly
|
||||||
.GetTypes()
|
.GetTypes()
|
||||||
@@ -128,4 +130,10 @@ internal static class TypeLoader
|
|||||||
|
|
||||||
return type != null;
|
return type != null;
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
type = null;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user