This code is C#
public bool CheckLicenseFeature(string featureName, string hostName = "") {
HostSystem host = null;
if (String.IsNullOrEmpty(hostName)) {
host = GetHostSystems().FirstOrDefault();
} else {
ost = GetHostSystems().Where(_host => _host.Name == hostName).FirstOrDefault();
}
if (host != null) {
LicenseFeatureInfo lfInfo = GetLicenseManager().QuerySupportedFeatures(host.MoRef).Where(x => x.FeatureName == featureName).FirstOrDefault();
if (lfInfo != null) {
return true;
}
}
return false;
}
When running QuerySupportedFeatures, I get:
The operation is not supported on the object.