IMetabase.CreateCheckList

Syntax

CreateCheckList: IMetabaseCheckList;

CreateCheckList(): Prognoz.Platform.Interop.Metabase.IMetabaseCheckList;

Description

The CreateCheckList method creates the list that is used for calculating and checking repository objects checksums.

Example

Executing the example requires that repository contains an object with the Folder_1 identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    CheckList: IMetabaseCheckList;
    MObj, MObj1: IMetabaseObjectDescriptor;
Begin
    MB := MetabaseClass.Active;
    CheckList := MB.CreateCheckList;
    MObj := MB.ItemById(
"Folder_1");
    CheckList.Add(MObj);
    
For Each MObj1 In MObj.Children Do
        CheckList.Add(MObj1);
    
End For;
    CheckList.SaveToFile(
"c:\control.crc");
End Sub UserProc;

Public Shared Sub Main(Params: StartParams);
    Var
    MB: IMetabase;
    CheckList: IMetabaseCheckList;
    MObjs: IMetabaseObjectDescriptors;
    MObj: IMetabaseObjectDescriptor;
    i: Integer;
Begin
    MB := Params.Metabase;
    CheckList := MB.CreateCheckList();
    MObj := MB.ItemById["Folder_1"];
    MObjs := MObj.Children;
    CheckList.Add(MObj);
    For i := 0 To MObjs.Count - 1 Do
        MObj := MObjs.Item[i];
        CheckList.Add(MObj);
    End For;
    CheckList.SaveToFile("c:\control.crc");
End Sub;

After executing the example a list for calculating checksums of objects is created. The Folder_1 object and all its child objects, if there are such, are added to this list. After calculation the checksums are saved into the c:\control.crc file.

See also:

IMetabase