Class UnmanagedLibraryResolver
Resolves unmanaged DLLs for Unmanaged
Inherited Members
Namespace: SharpAssimp .Unmanaged
Assembly: SharpAssimp.dll
Syntax
public sealed class UnmanagedLibraryResolver
Properties
| Edit this page View SourcePlatform
Gets the platform that the application is running on.
Declaration
public Platform Platform { get; }
Property Value
Type | Description |
---|---|
Platform |
Methods
| Edit this page View SourceResolveLibraryPath(string)
Given a library name, this function attempts to resolve the file path from which it can be loaded. Each step of the search strategy uses the fallback library names if the given name was not found in the current step. If the search is unsuccessfully, the library name is returned which means the OS will try and do its own search strategy when attempting to load the library (this is dependent on the OS). The search strategy is the following, in order of execution:
- Search user-specified probing paths.
- Search {AppBaseDirectory}/runtimes/{RID}/native/.
- Search {AppBaseDirectory}/.
- Search nuget package path, e.g. {UserProfile}/.nuget/packages/{PackageId}/{PackageVersion}/runtimes/{RID}/native/.
The search strategy gives priority to user-specified probing paths, then local paths to the application, then finally examining the global nuget cache. The RID is the Runtime Identifier based on the platform/architecture, see also Microsoft's RID Catalog.
Declaration
public string ResolveLibraryPath(string libName)
Parameters
Type | Name | Description |
---|---|---|
string | libName | Name of the library to attempt to resolve. |
Returns
Type | Description |
---|---|
string | Full file path to the library, or the file name if not found (e.g. "libXYZ.so"). |
SetFallbackLibraryNames(params string[])
Sets the collection of fallback library names (e.g. versioned libs) for both 32-bit and 64-bit probing.
Declaration
public void SetFallbackLibraryNames(params string[] fallbackLibNames)
Parameters
Type | Name | Description |
---|---|---|
string[] | fallbackLibNames | Null to clear, or set of fallback library names. |
SetFallbackLibraryNames32(params string[])
Sets the collection of fallback library names (e.g. versioned libs) for 32-bit probing.
Declaration
public void SetFallbackLibraryNames32(params string[] fallbackLibNames)
Parameters
Type | Name | Description |
---|---|---|
string[] | fallbackLibNames | Null to clear, or set of fallback library names. |
SetFallbackLibraryNames64(params string[])
Sets the collection of fallback library names (e.g. versioned libs) for 64-bit probing.
Declaration
public void SetFallbackLibraryNames64(params string[] fallbackLibNames)
Parameters
Type | Name | Description |
---|---|---|
string[] | fallbackLibNames | Null to clear, or set of fallback library names. |
SetOverrideLibraryName(string)
Sets an override 32-bit and 64-bit library name. By default, the Unmanaged
Declaration
public void SetOverrideLibraryName(string overrideName)
Parameters
Type | Name | Description |
---|---|---|
string | overrideName | Null to clear, or override library name. |
SetOverrideLibraryName32(string)
Sets an override 32-bit library name. By default, the Unmanaged
Declaration
public void SetOverrideLibraryName32(string overrideName)
Parameters
Type | Name | Description |
---|---|---|
string | overrideName | Null to clear, or override library name. |
SetOverrideLibraryName64(string)
Sets an override 64-bit library name. By default, the Unmanaged
Declaration
public void SetOverrideLibraryName64(string overrideName)
Parameters
Type | Name | Description |
---|---|---|
string | overrideName | Null to clear, or override library name. |
SetProbingPaths(params string[])
Sets the collection of file paths to probe for both 32-bit and 64-bit libraries. These paths always are first to be searched, in the order that they are given.
Declaration
public void SetProbingPaths(params string[] probingPaths)
Parameters
Type | Name | Description |
---|---|---|
string[] | probingPaths | Null to clear, or set of paths to probe. |
SetProbingPaths32(params string[])
Sets the collection of file paths to probe for 32-bit libraries. These paths always are first to be searched, in the order that they are given.
Declaration
public void SetProbingPaths32(params string[] probingPaths)
Parameters
Type | Name | Description |
---|---|---|
string[] | probingPaths | Null to clear, or set of paths to probe. |
SetProbingPaths64(params string[])
Sets the collection of file paths to probe for 64-bit libraries. These paths always are first to be searched, in the order that they are given.
Declaration
public void SetProbingPaths64(params string[] probingPaths)
Parameters
Type | Name | Description |
---|---|---|
string[] | probingPaths | Null to clear, or set of paths to probe. |