OpenOperations(Session: Integer): IAuditOperations;
OpenOperations(Session: uinteger): Prognoz.Platform.Interop.Metabase.IAuditOperations;
Session is a number of the session.
The OpenOperations method returns the list of operations that were performed in the repository, represented in the linear form.
Use the IAuditLog.OpenLogons property to get information about connections with repository.
To execute the example, add a link to the Metabase system assembly.
Sub Main;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AL: IAuditLog;
ALogs: IAuditLogons;
AOperat: IAuditOperations;
s: Array[0..10] Of String;
i: Integer;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
AL := MS.OpenAuditLog;
// information about connections with repository
ALogs := AL.OpenLogons(False);
// forming a list of operations
AOperat := AL.OpenOperations(ALogs.Session);
// displaying the number of current session
Debug.WriteLine("Session " + ALogs.Session.ToString + ": ");
For i := 0 To 9 Do
s[i] := AOperat.Name;
Debug.WriteLine(s[i]);
AOperat.Next;
End For;
End Sub Main;
After executing this example the console window contains names of the last ten operations on objects of the current repository session.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AL: IAuditLog;
ALogs: IAuditLogons;
AOperat: IAuditOperations;
s: Array[0..10] Of String;
i: Integer;
Begin
MB := Params.Metabase;
MS := MB.Security;
AL := MS.OpenAuditLog();
// information about connections with repository
ALogs := AL.OpenLogons(False);
// forming of a list of operations
AOperat := AL.OpenOperations(ALogs.Session);
// displaying the number of current session
System.Diagnostics.Debug.WriteLine("Session " + ALogs.Session.ToString() + ": ");
For i := 0 To 9 Do
s[i] := AOperat.Name;
System.Diagnostics.Debug.WriteLine(s[i]);
AOperat.Next();
End For;
End Sub;
See also: