ILicenseManager.FeatureDescription

Синтаксис

FeatureDescription(FeatureName: String): String;

FeatureDescription[System.String]: System.String;

Параметры

FeatureName. Наименование единицы лицензирования.

Описание

Свойство FeatureDescription возвращает наименование системной единицы лицензирования.

Комментарии

Наименования системных единиц лицензирования содержатся в кратком описании перечисления UiLicenseFeatureType.

Пример

Для выполнения примера добавьте ссылки на системные сборки: Host, Ui, Fore, Collections (ForeCollections для примера на Fore.NET).

Sub UserProc;
Var
    LicManager: ILicenseManager;
    AllFeatures: IStringList;
    Feature: String;
    Count,i: Integer;
Begin
    LicManager := WinApplication.Instance.LicenseManager;
    
// Получим список доступных единиц лицензирования
    AllFeatures := LicManager.GetAllFeatures;
    Count := AllFeatures.Count;
    
// Выведем в консоль список наименований полученных единиц лицензирования
    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;
    // Получим список доступных единиц лицензирования
    AllFeatures := LicManager.GetAllFeatures();
    Count := AllFeatures.Count;
    
// Выведем в консоль список наименований полученных единиц лицензирования
    For i := 0 To Count - 1 Do
        Feature := AllFeatures.Item[i] 
As String;
        System.Diagnostics.Debug.WriteLine(LicManager.FeatureDescription[Feature]);
    
End For;
End Sub;

После выполнения примера в консоль будет выведен список наименований единиц лицензирования.

См. также:

ILicenseManager