Metabase: IMetabase;
The Metabase property returns a repository where the current object is created.
Connect the Metabase system assembly.
Function GetMetabase(Descriptor: IMetabaseObjectDescriptor): IMetabase;
Begin
If Descriptor.IsLink Then
Return (Descriptor.Link.Open(Null) As 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.
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(Null) As IMetabaseLinkInstance).Metabase;
Else
Return Descriptor.Metabase;
End If;
End Function;
See also: