IForeNETSerializer.SaveAssemblyToFile

Syntax

SaveAssemblyToFile(Assembly: IForeNETAssembly; FileName: String);

Parameters

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.

Description

The SaveAssemblyToFile method saves the specified .NET assembly to the specified file.

Comments

The .NET assembly and all its child objects are saved into the file on calling this method.

Example

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:

IForeNETSerializer