Exemplo n.º 1
0
        public async Task <CodeListModel> GetListValues([FromRoute] string listname)
        {
            var alfrescoResponse = await _alfrescoHttpClient.CodeListGetWithValues(listname);

            return(new CodeListModel
            {
                Name = alfrescoResponse.CodeList.Name,
                Title = alfrescoResponse.CodeList.Title,
                Values = alfrescoResponse.CodeList.Values?.Select(x => x.ValueName)?.OrderBy(x => x)?.ToList()
            });
        }
Exemplo n.º 2
0
        private async Task <CodeListAll> GetAllCodeListsWithValues()
        {
            var completeList = new CodeListAll();

            var alfrescoResponse = await _alfrescoHttpClient.CodeListGetAll();

            foreach (var list in alfrescoResponse.CodeLists)
            {
                var values = await _alfrescoHttpClient.CodeListGetWithValues(list.Name);

                completeList.Values.Add(Copy(values.CodeList));
            }

            return(completeList);
        }