public static void SetCurrentAssemblyResolveHandler(
IReadOnlyCollection<string> probingPathList,
Func<AssemblyName, bool>? canAssemblyResolveFailFunc,
ILogger? logger,
ref Func<AssemblyLoadContext, AssemblyName?, Assembly>? currentAssemblyResolveHandler
)
Public Shared Sub SetCurrentAssemblyResolveHandler (
probingPathList As IReadOnlyCollection(Of String),
canAssemblyResolveFailFunc As Func(Of AssemblyName, Boolean),
logger As ILogger,
ByRef currentAssemblyResolveHandler As Func(Of AssemblyLoadContext, AssemblyName, Assembly)
)
public:
static void SetCurrentAssemblyResolveHandler(
IReadOnlyCollection<String^>^ probingPathList,
Func<AssemblyName^, bool>^ canAssemblyResolveFailFunc,
ILogger^ logger,
Func<AssemblyLoadContext^, AssemblyName^, Assembly^>^% currentAssemblyResolveHandler
)
static member SetCurrentAssemblyResolveHandler :
probingPathList : IReadOnlyCollection<string> *
canAssemblyResolveFailFunc : Func<AssemblyName, bool> *
logger : ILogger *
currentAssemblyResolveHandler : Func<AssemblyLoadContext, AssemblyName, Assembly> byref -> unit
Ссылка на текущий доступный обработчик. Рекомендуется использовать статическое поле в вызовах с разными списками сборок, которые должны подменять друг друга.
Для стандартного загрузчика используйте перегрузку без ref: SetCurrentAssemblyResolveHandler(IReadOnlyCollectionString, FuncAssemblyName, Boolean, ILogger).