IMetabaseObjectDescriptor.Metabase

Syntax

Metabase: IMetabase;

Description

The Metabase property returns a repository where the current object is created.

Fore Example

Connect the Metabase system assembly.

Function GetMetabase(Descriptor: IMetabaseObjectDescriptor): IMetabase;
Begin
    If Descriptor.IsLink Then
        Return (Descriptor.Link.Open(NullAs IMetabaseLinkInstance).Metabase;
    Else
        Return Descriptor.Metabase;
    End If;
End Function GetMetabase;

The specified function can be used to get repository by object description. If description corresponds to the label for the object form the other repository, the connection with repository is opened and repository context is obtained.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Function GetMetabase(Descriptor: IMetabaseObjectDescriptor): IMetabase;
Begin
    If Descriptor.IsLink Then
        Return (Descriptor.Link.Open(NullAs IMetabaseLinkInstance).Metabase;
    Else
        Return Descriptor.Metabase;
    End If;
End Function;

See also:

IMetabaseObjectDescriptor