IMetabaseCheckListItem.Hash

Syntax

Hash: String;

Description

The Hash property returns a hash code of the repository object.

Example

Executing the example requires the control.crc file that contains a list of repository objects and their checksums in the root of the disk C.

Sub Main;

Var

MB: IMetabase;

CheckList: IMetabaseCheckList;

ListItem: IMetabaseCheckListItem;

Begin

MB := MetabaseClass.Active;

CheckList := MB.CreateCheckList;

CheckList.LoadFromFile("c:\control.crc");

For Each ListItem In CheckList Do

Debug.Write("Identifier: " + ListItem.Id);

Debug.Write(" Hash code: " + ListItem.Hash);

Debug.Write(" Status:");

Select Case ListItem.Status As Integer

Case 1: Debug.WriteLine(" - Object is identical");

Case 2: Debug.WriteLine(" - Objects are not identical");

Case 3: Debug.WriteLine(" - Object is not present in the repository");

End Select;

End For;

End Sub Main;

After executing the example the checksums of the repository objects, the list of which is contained in the control.crc file are checked. Identifier of the objects, the hash code and the result of checksums comparison are displayed in the development environment console.

See also:

IMetabaseCheckListItem