Namespace_: IMetabaseObjectDescriptor
@Namespace: Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptor;
The Namespace_ property returns description of the object-container where the current object is stored.
The Namespace_ property will be available only for those objects which are stored in container objects. For the rest objects the property returns Null.
The example describes the GetNamespace function.
Function GetNamespace(Descriptor: IMetabaseObjectDescriptor): IMetabaseObjectDescriptor;
Var
Space: IMetabaseObjectDescriptor;
Begin
Space := Descriptor.Namespace_;
If Space = Null Then
Space := Descriptor.Metabase.Root;
End If;
Return Space;
End Function GetNamespace;
The specified function can be used to get description of the object which is container for the object sent as parameter. If the sent object is not stored in the container object, the function returns description of the repository root folder.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Function GetNamespace(Descriptor: IMetabaseObjectDescriptor): IMetabaseObjectDescriptor;
Var
Space: IMetabaseObjectDescriptor;
Begin
Space := Descriptor.@Namespace;
If Space = Null Then
Space := Descriptor.Metabase.Root;
End If;
Return Space;
End Function;
See also: