Archival: Boolean;
Archival: boolean;
The Archival property returns True if the current security protocol was loaded from the file.
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;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
// Open access protocol
Al := MS.OpenAuditLog;
If Al.Archival Then
Debug.WriteLine("Access protocol is loaded from file");
Else
Debug.WriteLine("Access protocol is not loaded from file");
End If;
// Check in license
Lic := Null;
End Sub UserProc;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AL: IAuditLog;
Lic: Object;
Begin
MB := Params.Metabase;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
MS := MB.Security;
// Open access protocol
Al := MS.OpenAuditLog();
If Al.Archival Then
System.Diagnostics.Debug.WriteLine("Access protocol is loaded from file");
Else
System.Diagnostics.Debug.WriteLine("Access protocol is not loaded from file");
End If;
// Check in license
Lic := Null;
End Sub;
After executing the example, the console will determine whether access protocol is loaded from file or not.
See also: