IMetabaseObjectDescriptor.Attributes

Syntax

Attributes: IABACAttributeInstances;

Attributes: Prognoz.Platform.Interop.ABAC.IABACAttributeInstances;

Description

The Attributes property returns system and custom attributes of repository object.

Comments

The property is read-only.

Example

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:

IMetabaseObjectDescriptor