IAuditFilterObjects.Item

Syntax

Item(Index: Integer): IAuditFilterObject;

Item[Index: integer]: Prognoz.Platform.Interop.Metabase.IAuditFilterObject;

Parameters

Index. Index of the object in collection.

Description

The Item property returns an object from collection by its index.

Example

Executing the example requires the C:\Filter.xml file.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    FilCon: IAuditFiltersContainer;
    Objs: IAuditFilterObjects;
    Obj: IAuditFilterObject;
Begin
    FilCon := New AuditFiltersContainer.Create;
    FilCon.Load;
    Objs := FilCon.Filters;
    Obj := Objs.Item(0).Edit;
    Obj.Description := "Filter description";
    Obj.Save;
    FilCon.SaveToFile("C:\Filter.xml");
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
    FilCon: IAuditFiltersContainer;
    Objs: IAuditFilterObjects;
    Obj: IAuditFilterObject;
Begin
    FilCon := New AuditFiltersContainer.Create();
    FilCon.Load();
    Objs := FilCon.Filters;
    Obj := Objs.Item[0].Edit();
    Obj.Description := "Filter description";
    Obj.Save();
    FilCon.SaveToFile("C:\Filter.xml");
End Sub;

After executing the example the description of the first filter of access protocol is changed. A container that contains this filter is saved in the file C:\Filter.xml.

See also:

IAuditFilterObjects