SaveAssemblyToFile(Assembly: IForeNETAssembly; FileName: String);
Assembly is a .NET assembly, that should be saved into the file.
FileName is a path and name of the file, to which the .NET assembly is saved. The specified file must have the ppnassembly extension.
The SaveAssemblyToFile method saves the specified .NET assembly to the specified file.
The .NET assembly and all its child objects are saved into the file on calling this method.
Executing this example requires that the repository contains a .NET assembly with the NETAssembly_1 identifier.
Sub UserProc;
Var
MB: IMetabase;
Fs: IForeNETSerializer;
MObj: IMetabaseObjectDescriptor;
NETAsm: IForeNETAssembly;
Begin
MB := MetabaseClass.Active;
Fs := New ForeNETSerializer.Create;
MObj := MB.ItemById("NETAssembly_1");
NETAsm := MObj.Bind As IForeNETAssembly;
Fs.SaveAssemblyToFile(NETAsm, "c:\" + MObj.Id + ".ppnassembly");
End Sub UserProc;
The specified .NET assembly is saved to the file in root of disk C on executing this example.
See also: