IMetabase.Classes

Syntax

Classes: IDbClasses;

Classes: Prognoz.Platform.Interop.Metabase.IDbClasses;

Description

The Classes property returns the collection of repository objects classes.

Example

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    Mb: IMetabase;
    i: Integer;
    Classes: IDbClasses;
    classDb: IDbClass;
Begin
    Mb := MetabaseClass.Active;
    Classes := Mb.Classes;
    
For i := 0 To Classes.Count - 1 Do
        classDb := Classes.Item(i);
        Debug.WriteLine(
"Class :" + classDb.Id);
        Debug.WriteLine(
" Name :" + classDb.Name);
        Debug.WriteLine(
" Key :" + classDb.Key.ToString);
    
End For;
    Debug.WriteLine(mb.Classes.Count);
End Sub UserProc;

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    i: Integer;
    Classes: IDbClasses;
    classDb: IDbClass;
Begin
    Mb := Params.Metabase;
    Classes := Mb.Classes;
    
For i := 0 To Classes.Count - 1 Do
        classDb := Classes.Item[i];
        System.Diagnostics.Debug.WriteLine(
"Class :" + classDb.Id);
        System.Diagnostics.Debug.WriteLine(
" Name :" + classDb.Name);
        System.Diagnostics.Debug.WriteLine(
" Key :" + classDb.Key.ToString());
    
End For;
    System.Diagnostics.Debug.WriteLine(mb.Classes.Count);
    
End Sub;
End Class;

After executing the example information about repository objects classes is displayed in the development environment console.

See also:

IMetabase