IMetabaseCustomObjectSerializer.References

Syntax

References: IMetabaseCustomObjectReferences;

Description

The References property returns dependencies of the object.

Example

Executing the example requires that the repository contains a custom class object with the OBJ_CUSTOM identifier.

Sub Main;

Var

Mb: IMetabase;

Object: IMetabaseObject;

CustomObject: IMetabaseCustomObject;

Reader: IMetabaseCustomObjectReader;

References: IMetabaseCustomObjectReferences;

i: Integer;

Ref: IMetabaseCustomObjectReference;

Begin

Mb := MetabaseClass.Active;

Object := Mb.ItemById(«OBJ_CUSTOM»).Bind;

CustomObject := Object As IMetabaseCustomObject;

Reader := CustomObject.CreateReader;

References := Reader.References;

For i := 0 To References.Count - 1 Do

Ref := References.Item(i);

Debug.WriteLine("Object name: " + Ref.Object.Name);

Debug.WriteLine("Dependency key: " + Ref.Key.ToString);

Debug.WriteLine("---");

End For;

End Sub Main;

Information about the objects, on which the OBJ_CUSTOM object depends, is displayed in the console window after executing this example.

See also:

IMetabaseCustomObjectSerializer