Ejemplo n.º 1
0
        public IEnumerable <KeyValueVO> SetHeadersJoin([FromBody] List <KeyValueVO> list, [FromHeader] string list1 = null, [FromHeader] string list2 = null)
        {
            if (list == null)
            {
                list = new List <KeyValueVO>();
            }
            List <KeyValueVO> list1Object = (list1 != null) ? DrapoConverter.DeserializeObject <List <KeyValueVO> >(list1) : null;

            if (list1Object != null)
            {
                list.AddRange(list1Object);
            }
            List <KeyValueVO> list2Object = list2 != null?DrapoConverter.DeserializeObject <List <KeyValueVO> >(list2) : null;

            if (list2Object != null)
            {
                list.AddRange(list2Object);
            }
            return(list);
        }
Ejemplo n.º 2
0
        public IEnumerable <KeyValueVO> GetHeadersJoin([FromHeader] string item = null, [FromHeader] string list1 = null, [FromHeader] string list2 = null)
        {
            List <KeyValueVO> list       = new List <KeyValueVO>();
            KeyValueVO        itemObject = DrapoConverter.DeserializeObject <KeyValueVO>(item);

            if (itemObject != null)
            {
                list.Add(itemObject);
            }
            List <KeyValueVO> list1Object = DrapoConverter.DeserializeObject <List <KeyValueVO> >(list1);

            if (list1Object != null)
            {
                list.AddRange(list1Object);
            }
            List <KeyValueVO> list2Object = list2 != null?DrapoConverter.DeserializeObject <List <KeyValueVO> >(list2) : null;

            if (list2Object != null)
            {
                list.AddRange(list2Object);
            }
            return(list);
        }