NShape Reference
AddLibraryByName Method

<< Click to Display Table of Contents >>

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

NShape Reference
AddLibraryByName Method

Previous pageReturn to chapter overviewNext page

Adds the library assembly with the given assembly name to the project.

Syntax

public void AddLibrary(string assemblyName, bool unloadOnClose)

Description

Adds the library assembly with the given assembly name to the project.

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

project.AutoLoadLibraries = true;
project.AddLibraryByName(assemblyName, false);

Parameters

Name

Description

Assembly

Assembly name of the library assembly to add.

The assembly will be loaded using the standard .NET mechanism for loading assemblies.

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.Load(string)

See Also

Class Reference: Project.AddLibrary Method

Class Reference: Project.AddLibrarByFilePath Method

Class Reference: Project.AutoLoadLibraries Property

Class Reference: Project.LibrarySearchPaths Property