Key: Integer;
The Key property returns a dependency key.
Executing the example requires that the repository contains a custom class object with the OBJ_CUSTOM identifier.
Sub Main;
Var
Mb: IMetabase;
CustomObject: IMetabaseCustomObject;
Reader: IMetabaseCustomObjectReader;
References: IMetabaseCustomObjectReferences;
i: Integer;
Ref: IMetabaseCustomObjectReference;
Begin
Mb := MetabaseClass.Active;
CustomObject := Mb.ItemById("OBJ_CUSTOM").Bind 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;
After executing the example, the condole window displays information about the objects, on which the specified object depends.
See also: