HttpServerBoxed 0.0.11 alpha
A simple http server for C# and .NET
Loading...
Searching...
No Matches
PluginLoadContext Class Reference

https://learn.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support More...

Inheritance diagram for PluginLoadContext:

Public Member Functions

 PluginLoadContext (string pluginPath)
 

Protected Member Functions

override? Assembly Load (AssemblyName assemblyName)
 
override IntPtr LoadUnmanagedDll (string unmanagedDllName)
 

Detailed Description

https://learn.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support

Definition at line 192 of file Launcher.cs.

Constructor & Destructor Documentation

◆ PluginLoadContext()

PluginLoadContext.PluginLoadContext ( string  pluginPath)

Definition at line 196 of file Launcher.cs.

197 {
198 _resolver = new AssemblyDependencyResolver(pluginPath);
199 }

Member Function Documentation

◆ Load()

override? Assembly PluginLoadContext.Load ( AssemblyName  assemblyName)
protected

Definition at line 201 of file Launcher.cs.

202 {
203 string? assemblyPath = _resolver.ResolveAssemblyToPath(assemblyName);
204
205 if (assemblyPath != null)
206 {
207 return LoadFromAssemblyPath(assemblyPath);
208 }
209
210 return null;
211 }

◆ LoadUnmanagedDll()

override IntPtr PluginLoadContext.LoadUnmanagedDll ( string  unmanagedDllName)
protected

Definition at line 213 of file Launcher.cs.

214 {
215 string? libraryPath = _resolver.ResolveUnmanagedDllToPath(unmanagedDllName);
216 if (libraryPath != null)
217 {
218 return LoadUnmanagedDllFromPath(libraryPath);
219 }
220
221 return IntPtr.Zero;
222 }

The documentation for this class was generated from the following file: