CountLogons([NoFilterLogons: Boolean = False]): Integer;
NoFilterLogons. Filtering conditions are not taken into account.
The CountLogons method returns the number of records about the connections to the repository (login) in the access protocol.
The NoFilterLogons parameter is optional. Available values:
True. Default value. Access protocol will not be filtered, i.e. the number of all record about connections to repository (login) will be returned.
False. Access protocol will be filtered. Filtering conditions are determined by the IAuditFilter interface. The number of records about the connections to the repository taking into account the filtering is returned.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AL: IAuditLog;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Check out license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
// Open access protocol
Al := MS.OpenAuditLog;
Debug.WriteLine("Record number about connection with repository: " + AL.CountLogons.ToString);
Debug.WriteLine("Record number about operations in repository: " + AL.CountOperations.ToString);
// Check in license
Lic := Null;
End Sub UserProc;
After executing the example the console will display the number of records in access protocol about connection with repository (login) and the number of records about operations in repository.
See also: