System.Xml.Schema.Compiler.DumpAttributes C# (CSharp) Méthode

DumpAttributes() private méthode

private DumpAttributes ( XmlSchemaObjectTable attributeUses, XmlSchemaAnyAttribute attributeWildcard ) : string
attributeUses XmlSchemaObjectTable
attributeWildcard XmlSchemaAnyAttribute
Résultat string
        private string DumpAttributes(XmlSchemaObjectTable attributeUses, XmlSchemaAnyAttribute attributeWildcard) {
            StringBuilder sb = new StringBuilder();
            sb.Append("[");
            bool first = true;
            foreach (XmlSchemaAttribute attribute in attributeUses.Values) {
                if (attribute.Use != XmlSchemaUse.Prohibited) {
                    if (first) {
                        first = false;
                    }
                    else {
                        sb.Append(" ");
                    }
                    sb.Append(attribute.QualifiedName.Name);       
                    if (attribute.Use == XmlSchemaUse.Optional || attribute.Use == XmlSchemaUse.None) {
                        sb.Append("?");                                                                  
                    }
                }
            }
            if (attributeWildcard != null) {
                if (attributeUses.Count != 0) {
                    sb.Append(" ");                                                                  
                }
                sb.Append("<");
                sb.Append(attributeWildcard.NamespaceList.ToString());
                sb.Append(">");
            }
            sb.Append("] - [");
            first = true;
            foreach (XmlSchemaAttribute attribute in attributeUses.Values) {
                if (attribute.Use == XmlSchemaUse.Prohibited) {
                    if (first) {
                        first = false;
                    }
                    else {
                        sb.Append(" ");
                    }
                    sb.Append(attribute.QualifiedName.Name);       
                }
            }
            sb.Append("]");
            return sb.ToString();
        }
#endif
Compiler