Ejemplo n.º 1
0
    /// <inheritdoc />
    public async Task <List <LanguageVariantModel <T> > > ListLanguageVariantsByItemAsync <T>(Reference identifier) where T : new()
    {
        if (identifier == null)
        {
            throw new ArgumentNullException(nameof(identifier));
        }

        var endpointUrl = _urlBuilder.BuildListVariantsByItemUrl(identifier);
        var response    = await _actionInvoker.InvokeReadOnlyMethodAsync <List <LanguageVariantModel> >(endpointUrl, HttpMethod.Get);

        return(response.Select(x => _modelProvider.GetLanguageVariantModel <T>(x)).ToList());
    }