LoadFromStream(Reader: IIOStream);
Reader. Stream where checksums of repository objects are saved.
The LoadFromStream method loads from the stream and verifies checksums of repository objects.
To save checksums to the stream, the SaveToStream method is used. Before loading checksums using the LoadFromStream method, it is recommended to put the cursor in the stream sent in the Reader parameter to the beginning, using the IIOStream.Seek method.
Add links to the IO, Metabase system assemblies.
Sub LoadCheckList(Reader: IIOStream);
Var
MB: IMetabase;
CheckList: IMetabaseCheckList;
ListItem: IMetabaseCheckListItem;
Begin
MB := MetabaseClass.Active;
CheckList := MB.CreateCheckList;
Reader.Seek(0, SeekOrigin.Beginning);
CheckList.LoadFromStream(Reader);
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 the identical");
Case 2: Debug.WriteLine(" - Object has differences");
Case 3: Debug.WriteLine(" - Object is absent in repository");
End Select;
End For;
End Sub LoadCheckList;
The specified procedure enables loading checksums from the stream and display the information by objects to the development environment console. The stream from which loading is executed is sent as input parameter.
See also: