←Select platform

AssemblyResolveCheckParentFolder Method

Summary

A method that can be used in an AssemblyResolve event to locate assemblies in the current or parent folder.

Syntax
C#
C++/CLI
public static Assembly AssemblyResolveCheckParentFolder( 
   object sender, 
   ResolveEventArgs args 
) 
public:  
   static Assembly^ AssemblyResolveCheckParentFolder( 
      Object^ sender, 
      ResolveEventArgs^ args 
   ) 

Parameters

sender

The source of the event.

args

The event data.

Return Value

The Assembly whose dependency is being resolved.

Remarks

This method can be hooked into an AssemblyResolve event to locate an assembly when the resolution of an assembly fails. It is particularly useful in LEADTOOLS medical add-ins. This method first checks to see if the missing assembly is already loaded in the current process. If the assembly still cannot be located, this method checks for the assembly in the current and parent folder.

Example

This example shows how a Medical add-in (or any other assembly) can use the AssemblyResolveCheckParentFolder method

C#
using Leadtools.Dicom.AddIn; 
 
 
public void Example_AssemblyResolveCheckParentFolder() 
{ 
   // Addin initialize code 
   AppDomain.CurrentDomain.AssemblyResolve += AddInUtils.AssemblyResolveCheckParentFolder; 
 
   // Do some work 
   // ... 
   // ... 
   // End of work 
 
   // Addin exit code 
   AppDomain.CurrentDomain.AssemblyResolve -= AddInUtils.AssemblyResolveCheckParentFolder; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.2.9
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Dicom.AddIn Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.