public TypeAttributes(MemberInfo memberInfo)
 {
     foreach (object attr in memberInfo.GetCustomAttributes(false))
     {
         Type type = attr.GetType();
         if (type == s_xTypeAttr)
         {
             Debug.Assert(XmlType == null, "Too many XTAs");
             XmlType = (XmlTypeAttribute)attr;
         }
         else if (type == s_xRootAttr)
         {
             Debug.Assert(XmlRoot == null, "Too many XRAs");
             XmlRoot = (XmlRootAttribute)attr;
         }
         else if (type == s_sTypeAttr)
         {
             Debug.Assert(SoapType == null, "Too many STAs");
             SoapType = (SoapTypeAttribute)attr;
         }
         else if (type == s_flagsAttr)
         {
             Debug.Assert(IsFlag == false, "too many Flags");
             IsFlag = true;
         }
         else
         {
             base.processAttribute(attr);
         }
     }
 }
        public TypeAttributes(MemberInfo memberInfo, SoapAttributes soapAtts) :
            this(memberInfo)
        {
            if (soapAtts == null)
            {
                return;
            }

            SoapType = soapAtts.SoapType;
        }