/// <summary> /// Initializes a new instance of the <see cref="NativeLibrary"/> class. /// </summary> /// <param name="names">An ordered collection of library names. Each name is tried in /// turn until the library is successfully loaded.</param> /// <param name="loader">The <see cref="LibraryLoader"/> which is used to load the library /// and retrieve function pointers.</param> /// <param name="pathResolver">A <see cref="PathResolver"/> instance which determines the algorithm /// for resolving library paths from library names.</param> public NativeLibrary(IEnumerable <String> names, LibraryLoader loader, PathResolver pathResolver) { this.loader = loader; this.Handle = loader.LoadNativeLibrary(names, pathResolver); }
/// <summary> /// Initializes a new instance of the <see cref="NativeLibrary"/> class. /// </summary> /// <param name="name">The name of the library to load.</param> /// <param name="loader">The <see cref="LibraryLoader"/> which is used to load the library /// and retrieve function pointers.</param> /// <param name="pathResolver">A <see cref="PathResolver"/> instance which determines the algorithm /// for resolving library paths from library names.</param> public NativeLibrary(String name, LibraryLoader loader, PathResolver pathResolver) { this.loader = loader; this.Handle = loader.LoadNativeLibrary(name, pathResolver); }