IMetabaseCustomClass.StandardOperations

Syntax

StandardOperations: IMetabaseCustomClassStandardOperations;

Description

The StandardOperations property returns the collection of class standard operations.

Example

Executing the example requires that repository custom metadata contains at least one custom class.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    Mb: IMetabase;
    CustomClassExtender: IMetabaseCustomExtender;
    CustomClass: IMetabaseCustomClass;
    StdOperations: IMetabaseCustomClassStandardOperations;
    Operations: IMetabaseCustomClassOperations;
    Operation: IMetabaseCustomClassOperation;
    i, c: Integer;
Begin
    Mb := MetabaseClass.Active;
    // Get custom class container
    CustomClassExtender := Mb.SpecialObject(MetabaseSpecialObject.CustomExtender).Edit As IMetabaseCustomExtender;
    // First custom class
    CustomClass := CustomClassExtender.Classes.Item(0);
    StdOperations := CustomClass.StandardOperations;
    Operations := CustomClass.Operations;
    // View list of operations
    Debug.WriteLine("---Standard operations---");
    c := StdOperations.Count;
    For i := 0 To c - 1 Do
        Operation := StdOperations.Item(i);
        Debug.WriteLine(Operation.Name + " (" + Operation.Id + ')')
    End For;
    Debug.WriteLine("---Custom operations---");
    c := Operations.Count;
    For i := 0 To c - 1 Do
        Operation := Operations.Item(i);
        Debug.WriteLine(Operation.Name + " (" + Operation.Id + ')')
    End For;
End Sub UserProc;

After executing the example the development environment console displays a list of standard and custom operations created for the first custom class.

See also:

IMetabaseCustomClass