SaveToStream(Writer: IIOStream);
SaveToStream(Writer: System.IO.Stream);
Writer. Stream where checksums of repository objects are saved.
The SaveToStream method saves the list of repository objects and calculated checksums to the stream.
To load checksums and check repository objects, use the LoadFromStream method.
Add links to the IO, Metabase system assemblies.
Sub SaveCheckList(ParentID: String; Var Writer: IIOStream);
Var
MB: IMetabase;
CheckList: IMetabaseCheckList;
MObj, MObj1: IMetabaseObjectDescriptor;
Begin
MB := MetabaseClass.Active;
CheckList := MB.CreateCheckList;
MObj := MB.ItemById(ParentID);
CheckList.Add(MObj);
For Each MObj1 In MObj.Children Do
CheckList.Add(MObj1);
End For;
CheckList.SaveToStream(Writer);
End Sub SaveCheckList;
Public Shared Sub SaveCheckList(MB: IMetabase; ParentID: string; Var Writer: Stream);
Var
CheckList: IMetabaseCheckList;
MDesc: IMetabaseObjectDescriptor;
MDescs: IMetabaseObjectDescriptors;
i, c: integer;
Begin
CheckList := MB.CreateCheckList();
MDesc := MB.ItemById[ParentID];
CheckList.Add(MDesc);
MDescs := MDesc.Children;
c := MDescs.Count;
For i := 0 To c - 1 Do
MDesc := MDescs.Item[i];
CheckList.Add(MDesc);
End For;
CheckList.SaveToStream(Writer);
End Sub;
The specified procedure enables saving checksums to the stream. The identifier of the folder for which children objects checksums are performed and the stream where it is saved are used as the procedure parameters.
See also: