Archival: Boolean;
Archival: System.Boolean;
The Archival property returns True if the current security protocol was loaded from the file.
To execute the example, add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.
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;
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.Metabase;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
AL: IAuditLog;
Lic: Object;
Begin
MB := Params.Metabase;
// Check out 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: