public FeatureDependencyItem(IPackageVersion featureVersion, IPackageVersion featureDependencyVersion, FeatureState state = FeatureState.None) { packageVersion = featureDependencyVersion; packageName = featureDependencyVersion.packageUniqueId; m_Name = new Label { name = "name" }; m_Name.text = featureDependencyVersion?.displayName ?? string.Empty; Add(m_Name); m_State = new VisualElement { name = "versionState" }; if (state == FeatureState.Customized && featureVersion.isInstalled) { m_State.AddToClassList(state.ToString().ToLower()); m_State.tooltip = L10n.Tr("This package has been manually customized"); } Add(m_State); }
/// <summary> /// Sets the requested state for a package that the TestBA will return to the engine during plan. /// </summary> /// <param name="packageId">Package identity.</param> /// <param name="state">State to request.</param> public void SetPackageFeatureState(string packageId, string featureId, FeatureState state) { this.SetPackageState(packageId, String.Concat(featureId, "Requested"), state.ToString()); }
/// <summary> /// Sets the requested state for a package that the TestBA will return to the engine during plan. /// </summary> /// <param name="packageId">Package identity.</param> /// <param name="state">State to request.</param> protected void SetPackageFeatureState(string packageId, string featureId, FeatureState state) { this.SetPackageState(packageId, String.Concat(featureId, "Requested"), state.ToString()); }