IsContainer: Boolean;
IsContainer: System.Boolean;
The IsContainer property determines the permission to add child objects for a custom class.
Available values:
True. A custom class is a container object, which allows for creating any repository objects inside of it. Such an object has also a proper identifiers space.
False. A custom class is not a container object.
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: