pub struct AssemblyDelegateLoader<'a, A: AsRef<PdCStr>> { /* private fields */ }
Expand description

A struct for loading pointers to managed functions for a given HostfxrContext which automatically loads the assembly from the given path on the first access.

Implementations

Creates a new AssemblyDelegateLoader wrapping the given DelegateLoader loading the assembly from the given path on the first access.

If this is the first loaded function pointer, calling this function will load the specified assembly in isolation (into its own AssemblyLoadContext) and it will use AssemblyDependencyResolver on it to provide dependency resolution. Otherwise or once loaded it will find the specified type and method and return a native function pointer to that method. Calling this function will find the specified type and method and return a native function pointer to that method.

Arguments
  • type_name: Assembly qualified type name to find
  • method_name: Name of the method on the type_name to find. The method must be static and must match the signature of delegate_type_name.
  • delegate_type_name: Assembly qualified delegate type name for the method signature.

If this is the first loaded function pointer, calling this function will load the specified assembly in isolation (into its own AssemblyLoadContext) and it will use AssemblyDependencyResolver on it to provide dependency resolution. Otherwise or once loaded it will find the specified type and method and return a native function pointer to that method. Calling this function will find the specified type and method and return a native function pointer to that method.

Arguments
  • type_name: Assembly qualified type name to find
  • method_name: Name of the method on the type_name to find. The method must be static and must match the following signature: public delegate int ComponentEntryPoint(IntPtr args, int sizeBytes);

If this is the first loaded function pointer, calling this function will load the specified assembly in isolation (into its own AssemblyLoadContext) and it will use AssemblyDependencyResolver on it to provide dependency resolution. Otherwise or once loaded it will find the specified type and method and return a native function pointer to that method. Calling this function will find the specified type and method and return a native function pointer to that method.

Arguments
  • type_name: Assembly qualified type name to find
  • method_name: Name of the method on the type_name to find. The method must be static and must match be annotated with UnmanagedCallersOnly.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.