FeatureDescription(FeatureName: String): String;
FeatureDescription[System.String]: System.String;
FeatureName. Feature name.
The FeatureDescription property returns name of a system feature.
Names of system features are contained in the UiLicenseFeatureType enumeration brief description.
Executing the example requires links to the Host, Ui, Fore, Collections (ForeCollections for Fore.NET example) system assemblies.
Sub UserProc;
Var
LicManager: ILicenseManager;
AllFeatures: IStringList;
Feature: String;
Count,i: Integer;
Begin
LicManager := WinApplication.Instance.LicenseManager;
// Get a list of available features
AllFeatures := LicManager.GetAllFeatures;
Count := AllFeatures.Count;
// Display a list of obtained features names to the console
For i := 0 To Count - 1 Do
Feature := AllFeatures.Item(i) As String;
Debug.WriteLine(LicManager.FeatureDescription(Feature));
End For;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Host;
Imports Prognoz.Platform.Interop.Ui;
Imports Prognoz.Platform.Interop.Fore;
Imports Prognoz.Platform.Interop.ForeCollections;
…
Public Shared Sub Main(Params: StartParams);
Var
LicManager: ILicenseManager;
AllFeatures: System.Collections.Generic.IList<System.String>;
Feature: String;
Count,i: Integer;
WinApp: WinApplicationClassClass = New WinApplicationClassClass();
Svc: IForeServices;
RunContext: ForeRuntimeContext;
Begin
Svc := Params.Metabase As IForeServices;
RunContext := Svc.GetRuntime().Context;
LicManager := WinApp.Instance[RunContext].LicenseManager;
// Get a list of available features
AllFeatures := LicManager.GetAllFeatures();
Count := AllFeatures.Count;
// Display a list of obtained features names to console
For i := 0 To Count - 1 Do
Feature := AllFeatures.Item[i] As String;
System.Diagnostics.Debug.WriteLine(LicManager.FeatureDescription[Feature]);
End For;
End Sub;
After executing the example, the console will display a list of features names.
See also: