IForeNETAssembly.IsExternal

Syntax

IsExternal: Boolean;

Description

The IsExternal property determines whether one corresponds to external assembly.

If the property is set to True, external assembly is loaded into the .NET assembly.

Example

Executing the example requires the UserFunc.dll file, received as a result of compilation of any assembly, to be present in the root of disk C.

Sub UserProc;
Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    Assembly: IMetabaseObject;
    NETAssembly: IForeNETAssembly;
Begin
    MB := MetabaseClass.Active;
    CrInfo := MB.CreateCreateInfo;
    CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_NETASSEMBLY;
    CrInfo.Name := "UserFunc";
    CrInfo.Id := "ExtAssembly";
    CrInfo.Parent := MB.Root;
    Assembly := MB.CreateObject(CrInfo).Edit;
    Assembly.Save;
    NETAssembly := Assembly As IForeNETAssembly;
    NETAssembly.LoadExternal("c:\UserFunc.dll");
    NETAssembly.IsExternal := True;
    Assembly.Save;
End Sub UserProc;

After executing this example a new .NET assembly is created in the root of repository. The external assembly, contained in the file UserFunc.dll, is loaded into this assembly.

See also:

IForeNETAssembly