SaveModuleToFile(Module: IForeNETModule; FileName: String);
Module is a .NET unit to be saved into the file.
FileName is a path and name of the file in which the .NET unit is saved. The specified file must have the ppnmodule extension.
The SaveModuleToFile method saves the specified .NET unit to the specified file.
Executing this example requires that the repository contains a .NET assembly with the NETAssembly_1 identifier. This .NET assembly contains a .NET unit with the TestModule identifier.
Sub UserProc;
Var
MB: IMetabase;
Fs: IForeNETSerializer;
MObj: IMetabaseObjectDescriptor;
NETModule: IForeNETModule;
Begin
MB := MetabaseClass.Active;
Fs := New ForeNETSerializer.Create;
MObj := MB.ItemByIdNamespace("TestModule", MB.ItemById("NETAssembly_1").Key);
NETModule := MObj.Bind As IForeNETModule;
Fs.SaveModuleToFile(NETModule, "c:\" + MObj.Id + ".ppnmodule");
End Sub UserProc;
The specified .NET form is saved to the file in root of disk C at executing this example.
See also: