IMetabaseCustomClass.IsContainer

Syntax

IsContainer: Boolean;

IsContainer: System.Boolean;

Description

The IsContainer property determines the permission to add child objects for a custom class.

Comments

Available values:

Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    Mb: IMetabase;
    ClassNew: IMetabaseCustomClass;
    CustomClass: IMetabaseCustomExtender;
    Type: MetabaseSpecialObject;

Begin
    Mb := Metabaseclass.Active;
    Type := MetabaseSpecialObject.CustomExtender;
    CustomClass := Mb.SpecialObject(Type).Edit 
As IMetabaseCustomExtender;
    ClassNew := CustomClass.Classes.Add;
    ClassNew.Name := 
"Container";
    ClassNew.
Description := "Container class";
    ClassNew.Data := 
"Custom text of arbitrary format";
    ClassNew.IsContainer := 
True;
    (CustomClass 
As IMetabaseObject).Save;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    ClassNew: IMetabaseCustomClass;
    CustomClass: IMetabaseCustomExtender;
    Type: MetabaseSpecialObject;
Begin
    Mb := Params.Metabase;
    Type := MetabaseSpecialObject.msoCustomExtender;
    CustomClass := Mb.SpecialObject[Type].Edit() 
As IMetabaseCustomExtender;
    ClassNew := CustomClass.Classes.Add();
    ClassNew.Name := 
"Container";
    ClassNew.
Description := "Container class";
    ClassNew.Data := 
"Custom text of arbitrary format";
    ClassNew.IsContainer := 
True;
    (CustomClass 
As IMetabaseObject).Save();
End Sub;

After executing the example, the Container custom class is created with the permission to add child objects.

See also:

IMetabaseCustomClass