Object: IMetabaseObjectDescriptor;
The Object property determines a repository object to be updated.
Executing the example requires that the repository contains a container of custom classes with the CUSTOM_EXTENDER identifier.
Sub Main;
Var
Mb: IMetabase;
Obj: IMetabaseObjectDescriptor;
Upd: IMetabaseUpdate;
Nd: IMetabaseUpdateObjectNode;
RootFolder: IMetabaseUpdateFolderNode;
NdFol: IMetabaseUpdateFolderNode;
Begin
Mb := MetabaseClass.Active;
Upd := Mb.CreateUpdate;
Obj := Mb.ItemById("CUSTOM_EXTENDER").Edit;
RootFolder := Upd.RootFolder;
Nd := RootFolder.Add(MetabaseUpdateNodeType.Object) As IMetabaseUpdateObjectNode;
Nd.Object := Obj;
Nd.IncludeChildrenDependencies := TriState.OnOption;
NdFol := (Nd As IMetabaseUpdateFolderNode);
Debug.WriteLine("The number of dependent objects added to the update for an object '" + Obj.Name + "': " + NdFol.Count.ToString);
Upd.SaveToFileNF("C:\Update.pefx");
End Sub Main;
After executing the example an update containing the container of custom classes - CUSTOM_EXTENDER - and all its child objects will be created. The update will be saved to the C:\Update.pefx file.
See also: