IMetabaseUpdateObjectNode.Object

Syntax

Object: IMetabaseObjectDescriptor;

Description

The Object property determines a repository object that needs updating.

Example

Executing the example requires that the repository contains a container of user 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 the 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 user classes - CUSTOM_EXTENDER - and all its child objects, will be created. The update will be saved into the file C:\Update.pefx.

See also:

IMetabaseUpdateObjectNode