Ejemplo n.º 1
0
        protected void AddDescription(Type attributeType, MemberDescription description)
        {
            Type type = attributeType;
            List <MemberDescription> result;

            if (!(_members ?? (_members = new Dictionary <Type, List <MemberDescription> >())).TryGetValue(type, out result))
            {
                result = new List <MemberDescription>(_memberCapacity);
                (_members ?? (_members = new Dictionary <Type, List <MemberDescription> >())).Add(type, result);
            }
            result.Add(description);
            MapMemberAttribute(type);
        }
Ejemplo n.º 2
0
 protected void AddDescription(Attribute attribute, MemberDescription description)
 {
     AddDescription(attribute.GetType(), description);
 }