コード例 #1
0
 public AttributeLayout GetAttributeLayout()
 {
     if (Prefix == "xmlns" || LocalName == "xmlns")
     {
         if (Value.StartsWith("http://schemas.microsoft.com"))
         {
             return(AttributeLayout.XmlnsMicrosoft);
         }
         if (Value.StartsWith("clr"))
         {
             return(AttributeLayout.XmlnsWithClr);
         }
         return(AttributeLayout.Xmlns);
     }
     if (Prefix == "x")
     {
         return(AttributeLayout.X);
     }
     if (Prefix != null)
     {
         return(AttributeLayout.WithPrefix);
     }
     if (LocalName.Contains("."))
     {
         return(AttributeLayout.Attached);
     }
     if (AttributeComparrer.SpecialOrder.Contains(LocalName))
     {
         return(AttributeLayout.SpecialOrder);
     }
     return(AttributeLayout.ByName);
 }