Attributes: IABACAttributeInstances;
The Attributes property returns system and custom attributes of repository object.
The property is read-only.
Executing the example requires a repository object with the OBJ_ATTR identifier.
Add links to the ABAC, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
Attr: IABACAttributeInstances;
MDescr: IMetabaseObjectDescriptors;
i, Count: Integer;
Begin
MB := MetabaseClass.Active;
MDesc := Mb.ItemById("OBJ_ATTR");
Attr := MDesc.Attributes;
Count := Attr.Count;
For i := 0 To Count-1 Do
Debug.WriteLine(Attr.Item(i).Name(MB.CurrentLocale));
End For;
End Sub UserProc;
Imports Prognoz.Platform.Interop.ABAC;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
Attr: IABACAttributeInstances;
MDescr: IMetabaseObjectDescriptors;
i, Count: Integer;
Begin
MB := Params.Metabase;
MDesc := Mb.ItemById["D_ATTR"];
Attr := MDesc.Attributes;
Count := Attr.Count;
For i := 0 To Count-1 Do
System.Diagnostics.Debug.WriteLine(Attr.Item[i].Name[MB.CurrentLocale]);
End For;
End Sub;
After executing the example the console displays names of system and custom attributes of the specified repository object.
See also: