/// <inheritdoc /> public async Task <FeatureDefinition> GetFeatureDefinitionAsync(string featureName, CancellationToken cancellationToken = default) { if (featureName == null) { throw new ArgumentNullException(nameof(featureName)); } IFeatureManagementAppTierAPI featureApi = CreateFeatureManagementApi(); var feature = await featureApi.GetFeatureByNameAsync(featureName, cancellationToken) .ConfigureAwait(false) as Feature; if (feature == null) { throw new FeatureManagementException(FeatureManagementError.MissingFeature, $"Feature {featureName} not found"); } FeatureDefinition definition = _definitions?.GetOrAdd(featureName, _ => ReadFeatureDefinition(feature)); return(definition); }