IMetabaseObjectDescriptor.Dependents

Syntax

Dependents: IMetabaseObjectDescriptors;

Dependents: Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptors;

Description

The Dependents property returns a collection of descriptions of the repository objects that depends on the given object.

Comments

The property returns an empty collection if any repository object does not depend on this object.

Example

Executing the example requires that the repository contains a time series database with the TSBD identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
    MDescr: IMetabaseObjectDescriptors;
Begin
    MB := MetabaseClass.Active;
    MDesc := Mb.ItemById("TSDB");
    MDescr := MDesc.Dependents;
    If MDescr.Count <> 0 Then
        Debug.WriteLine("The following objects depend on ""TSDB"":");
        For Each MDesc In MDescr Do
            Debug.WriteLine("Name :" + MDesc.Name + "; Identifier: " + MDesc.Id);
        End For;
    End If;
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
    MDescr: IMetabaseObjectDescriptors;
Begin
    MB := Params.Metabase;
    MDesc := Mb.ItemById["TSDB"];
    MDescr := MDesc.Dependents;
    If MDescr.Count <> 0 Then
        System.Diagnostics.Debug.WriteLine("The following objects depend on ""TSDB"":");
        For Each MDesc In MDescr Do
            System.Diagnostics.Debug.WriteLine("Name :" + MDesc.Name + "; Identifier: " + MDesc.Id);
        End For;
    End If;
End Sub;

After executing this example, if any objects depend on the specified object, their names and identifiers are displayed in the development environment console.

See also:

IMetabaseObjectDescriptor

IMetabaseObjectDescriptor.FetchDependents