InitAssembly;
The InitAssembly method executes the base setting of .NET assembly.
After executing this method the following changes will be made in assembly:
A new Program unit, containing an entry point, is created in the assembly.
A link to assembly of the Metabase repository is added.
A link to the System .NET assembly, registered in GAC, is added.
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: