IMetabaseUpdateProgress.OnNullLinks

Syntax

OnNullLinks(Node: IMetabaseUpdateNode; Links: IMetabaseUpdateNullLinks);

Parameters

Node. Update object.

Links. Collection of missing links.

Description

The OnNullLinksResolve method implements an event that occurs if there are links that are missing in destination repository.

Example

Executing the example requires the Update.pefx update file that contains an object with the 1286399 key that will contain missing links during update.

Sub UserProc;
Var
    MB: IMetabase;
    MUpdate: IMetabaseUpdate;
    Progress: MyUpdateProgress;
    UpdateCxt: IMetabaseUpdateContext;
Begin
    MB := MetabaseClass.Active;
    MUpdate := MB.CreateUpdate;
    MUpdate.LoadFromFileNF("C:\update.pefx");
    Progress := New MyUpdateProgress.Create;
    UpdateCxt := MUpdate.CreateUpdateContext;
    UpdateCxt.RegisterNullRemapping(1286399);
    MUpdate.ApplyEx(Progress, UpdateCxt);
End Sub UserProc;

Class MyUpdateProgress: UpdateProgress
    Sub OnNullLinks(Node: IMetabaseUpdateNode; Links: IMetabaseUpdateNullLinks);
    Var
        Link: IMetabaseUpdateNullLink;
        i: Integer;
        MB: IMetabase;
    Begin
        MB := MetabaseClass.Active;
        Debug.WriteLine("OnNullLInks");
        For i := 0 To Links.Count - 1 Do
            Link := Links.Item(i);
                Debug.WriteLine("Id: " + Link.Id);
                Debug.WriteLine("Name: " + Link.Name);
                Debug.WriteLine("Key: " + Link.Key.ToString);
                Debug.WriteLine("Description: " + Link.Description);
                Debug.WriteLine("ClassId: " + Link.ClassId.ToString);
                Debug.WriteLine("---");
        End For;
    End Sub OnNullLinks;
End Class MyUpdateProgress;

After executing the example the console displays information about missing links.

See also:

IMetabaseUpdateProgress