IMetabaseObjectDescriptor.Metabase

Syntax

Metabase: IMetabase;

Metabase: Prognoz.Platform.Interop.Metabase.IMetabase;

Description

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

Example

The GetMetabase function is described in the 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;

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;

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.

See also:

IMetabaseObjectDescriptor