public void getAttributes(String userId, Dictionary <String, List <LinkIDAttribute> > attributeMap) { String[] attributeNames = new String[attributeMap.Keys.Count]; attributeMap.Keys.CopyTo(attributeNames, 0); AttributeQueryType request = getAttributeQuery(userId, attributeNames); ResponseType response = getResponse(request); checkStatus(response); getAttributeValues(response, attributeMap); }
public Dictionary <String, List <LinkIDAttribute> > getAttributes(String userId) { Dictionary <String, List <LinkIDAttribute> > attributeMap = new Dictionary <string, List <LinkIDAttribute> >(); AttributeQueryType request = getAttributeQuery(userId, new String[] { }); ResponseType response = getResponse(request); checkStatus(response); getAttributeValues(response, attributeMap); return(attributeMap); }
private AttributeQueryType getAttributeQuery(string userId, string[] attributeNames) { AttributeQueryType attributeQuery = new AttributeQueryType(); SubjectType subject = new SubjectType(); NameIDType subjectName = new NameIDType(); subjectName.Value = userId; subject.Items = new Object[] { subjectName }; attributeQuery.Subject = subject; if (null != attributeNames) { List <AttributeType> attributes = new List <AttributeType>(); foreach (string attributeName in attributeNames) { AttributeType attribute = new AttributeType(); attribute.Name = attributeName; attributes.Add(attribute); } attributeQuery.Attribute = attributes.ToArray(); } return(attributeQuery); }
private ResponseType getResponse(AttributeQueryType request) { return(this.client.AttributeQuery(request)); }