Exemplo n.º 1
0
 public Element FindAttributeElementByTitle(string projectId, Models.Attribute attribute, string elementTitle, List <Element> elements = null)
 {
     if (elements == null)
     {
         elements = GetAttributeElements(projectId, attribute);
     }
     return(elements.FirstOrDefault(x => x.Title.Equals(elementTitle, StringComparison.OrdinalIgnoreCase)));
 }
Exemplo n.º 2
0
        public List <Element> GetAttributeElements(string projectId, Models.Attribute attribute)
        {
            var url      = Url.Combine(Config.Url, attribute.Content.DisplayForms[0].Links.Elements);
            var response = GetRequest(url);
            var attributeElemntsResponse = JsonConvert.DeserializeObject(response, typeof(AttributeElemntsResponse)) as AttributeElemntsResponse;

            return(attributeElemntsResponse.AttributeElements.Elements);
        }