IAuditFilterObject.Assign

Syntax

Assign(Value: IAuditFilterObject);

Assign(Value: Prognoz.Platform.Interop.Metabase.IAuditFilterObject);

Parameters

Value. Object that must be copied.

Description

The Assign method copies an object that contains a filter of access protocol.

Example

Executing the example requires the file "C:\Filter.xml" that contains a filter of access protocol.

Add a link to the Metabase system assembly.

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

After executing this example parameters of the first filter from the FilConDef container becomes similar to parameters of the first filter from the FilCon container.

See also:

IAuditFilterObject