コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 private ResponseType getResponse(AttributeQueryType request)
 {
     return(this.client.AttributeQuery(request));
 }