IForeNETAssemblyReferences.Add

Syntax

Add(Value: IForeNETAssembly): IForeNETAssemblyReference;

Parameters

Value is a .NET assembly of repository, that needs to be referenced in the current .NET assembly.

Description

The Add method adds a link to a repository .NET assembly.

Example

Executing this example requires that the repository contains two .NET assemblies with the Assembly_1 and Assembly_2 identifiers.

Sub UserProc;
Var
    MB: IMetabase;
    Assm, Assm1: IForeNETAssembly;
    AssmRefs: IForeNETAssemblyReferences;
Begin
    MB := MetabaseClass.Active;
    Assm := MB.ItemById("Assembly_1").Edit As IForeNETAssembly;
    Assm1 := MB.ItemById("Assembly_2").Bind As IForeNETAssembly;
    AssmRefs := Assm.References;
    AssmRefs.Add(Assm1);
    (Assm As IMetabaseObject).Save;
End Sub UserProc;

After executing this example, the link to repository .NET assembly Assembly_2 is added to .NET assembly Assembly_1.

See also:

IForeNETAssemblyReferences