IForeSerializer.SaveAssemblyToFile

Syntax

SaveAssemblyToFile(Assembly: IAssembly; FileName: String);

Parameters

Assembly is the repository assembly that should be saved into the file.

FileName is a path and name of the file in which the assembly is saved.

Description

The SaveAssemblyToFile method saves the assembly into the specified file.

Comments

The ppassembly extension must be specified for the file where the file is saved.

Example

Executing the example requires that the repository contains an assembly with the Assembly_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    Fs: IForeSerializer;
    MObj: IMetabaseObjectDescriptor;
    Assm: IAssembly;
Begin
    MB := MetabaseClass.Active;
    Fs := New ForeSerializer.Create;
    MObj := MB.ItemById("Assembly_1");
    Assm := MObj.Bind As IAssembly;
    Fs.SaveAssemblyToFile(Assm, "c:\" + MObj.Id + ".ppassembly");
End Sub UserProc;

The specified assembly is saved in the file in disk C root after executing this example.

See also:

IForeSerializer