IForeNETAssembly.InitAssembly

Syntax

InitAssembly;

Description

The InitAssembly method executes the base setting of .NET assembly.

Comments

After executing this method the following changes will be made in assembly:

Example

Sub CreateNETAssembly;
Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    NETAssembly: IForeNETAssembly;
Begin
    MB := MetabaseClass.Active;
    CrInfo := MB.CreateCreateInfo;
    CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_NETASSEMBLY;
    CrInfo.Name := "New assembly";
    CrInfo.Parent := MB.Root;
    CrInfo.Permanent := True;
    NETAssembly := MB.CreateObject(CrInfo).Bind As IForeNETAssembly;
    NETAssembly.InitAssembly;
End Sub CreateNETAssembly;

After executing this example a new .NET assembly is created in the root of repository. This .NET assembly contains the base Program unit containing the entry point. Also, the links to assembly of Metabase repository and to System .NET assembly are added to the assembly.

See also:

IForeNETAssembly