NShape Reference
AddLibraryByFilePath Method

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape > Project Class >

NShape Reference
AddLibraryByFilePath Method

Previous pageReturn to chapter overviewNext page

Adds the library assembly at the given location to the project.

Syntax

public void AddLibraryByFilePath(string assemblyPath, bool unloadOnClose)

Description

Adds the library assembly at the given location to the project.

The library load mechanism of NShape 1.0.x is equal to

project.AutoLoadLibraries = true;
project.AddLibraryByFilePath(assemblyPath, false);

Parameters

Name

Description

Assembly

File path of the library assembly to add.

If AutoLoadLibraries set to true and the library file was not found (or only a file name was specified), the file will be searched in the LibrarySearchPaths.

unloadOnClose

Specifies whether the library should be unloaded when closing the project.

When setting AutoLoadLibraries to false, libraries should not be unloaded when closing the project.

Exceptions

Exception

Condition

ArgumentNullException

Parameter assembly is null.

InvalidOperationException

The library was already added to the project.

 

For more Exceptions, see Documentation of

Assembly.LoadFile(string)

See Also

Class Reference: Project.AddLibrary Method

Class Reference: Project.AddLibraryByName Method

Class Reference: Project.AutoLoadLibraries Property

Class Reference: Project.LibrarySearchPaths Property