void Write46_XmlSchemaElement(XmlSchemaElement o) { if ((object)o == null) { return; } System.Type t = o.GetType(); WriteStartElement("element"); WriteAttribute(@"id", @"", o.Id); WriteAttribute("minOccurs", "", XmlConvert.ToString(o.MinOccurs)); WriteAttribute("maxOccurs", "", o.MaxOccurs == decimal.MaxValue ? "unbounded" : XmlConvert.ToString(o.MaxOccurs)); if (((System.Boolean)o.@IsAbstract) != false) { WriteAttribute(@"abstract", @"", XmlConvert.ToString((System.Boolean)((System.Boolean)o.@IsAbstract))); } WriteAttribute(@"block", @"", Write11_XmlSchemaDerivationMethod(o.BlockResolved)); WriteAttribute(@"default", @"", o.DefaultValue); WriteAttribute(@"final", @"", Write11_XmlSchemaDerivationMethod(o.FinalResolved)); WriteAttribute(@"fixed", @"", o.FixedValue); if (o.Parent != null && !(o.Parent is XmlSchema)) { if (o.QualifiedName != null && !o.QualifiedName.IsEmpty && o.QualifiedName.Namespace != null && o.QualifiedName.Namespace.Length != 0) { WriteAttribute(@"form", @"", "qualified"); } else { WriteAttribute(@"form", @"", "unqualified"); } } if (o.Name != null && o.Name.Length != 0) { WriteAttribute(@"name", @"", o.Name); } if (o.IsNillable) { WriteAttribute(@"nillable", @"", XmlConvert.ToString(o.IsNillable)); } if (!o.SubstitutionGroup.IsEmpty) { WriteAttribute("substitutionGroup", "", o.SubstitutionGroup); } if (!o.RefName.IsEmpty) { WriteAttribute("ref", "", o.RefName); } else if (!o.SchemaTypeName.IsEmpty) { WriteAttribute("type", "", o.SchemaTypeName); } WriteAttributes((XmlAttribute[])o.@UnhandledAttributes, o); Write5_XmlSchemaAnnotation(o.Annotation); if (o.SchemaType is XmlSchemaComplexType) { Write35_XmlSchemaComplexType((XmlSchemaComplexType)o.SchemaType); } else if (o.SchemaType is XmlSchemaSimpleType) { Write9_XmlSchemaSimpleType((XmlSchemaSimpleType)o.SchemaType); } WriteSortedItems(o.Constraints); WriteEndElement(); }
private void Write46_XmlSchemaElement(XmlSchemaElement o) { if (o != null) { o.GetType(); this.WriteStartElement("element"); this.WriteAttribute("id", "", o.Id); this.WriteAttribute("minOccurs", "", XmlConvert.ToString(o.MinOccurs)); this.WriteAttribute("maxOccurs", "", (o.MaxOccurs == 79228162514264337593543950335M) ? "unbounded" : XmlConvert.ToString(o.MaxOccurs)); if (o.IsAbstract) { this.WriteAttribute("abstract", "", XmlConvert.ToString(o.IsAbstract)); } this.WriteAttribute("block", "", this.Write11_XmlSchemaDerivationMethod(o.BlockResolved)); this.WriteAttribute("default", "", o.DefaultValue); this.WriteAttribute("final", "", this.Write11_XmlSchemaDerivationMethod(o.FinalResolved)); this.WriteAttribute("fixed", "", o.FixedValue); if ((o.Parent != null) && !(o.Parent is XmlSchema)) { if (((o.QualifiedName != null) && !o.QualifiedName.IsEmpty) && ((o.QualifiedName.Namespace != null) && (o.QualifiedName.Namespace.Length != 0))) { this.WriteAttribute("form", "", "qualified"); } else { this.WriteAttribute("form", "", "unqualified"); } } if ((o.Name != null) && (o.Name.Length != 0)) { this.WriteAttribute("name", "", o.Name); } if (o.IsNillable) { this.WriteAttribute("nillable", "", XmlConvert.ToString(o.IsNillable)); } if (!o.SubstitutionGroup.IsEmpty) { this.WriteAttribute("substitutionGroup", "", o.SubstitutionGroup); } if (!o.RefName.IsEmpty) { this.WriteAttribute("ref", "", o.RefName); } else if (!o.SchemaTypeName.IsEmpty) { this.WriteAttribute("type", "", o.SchemaTypeName); } this.WriteAttributes(o.UnhandledAttributes, o); this.Write5_XmlSchemaAnnotation(o.Annotation); if (o.SchemaType is XmlSchemaComplexType) { this.Write35_XmlSchemaComplexType((XmlSchemaComplexType)o.SchemaType); } else if (o.SchemaType is XmlSchemaSimpleType) { this.Write9_XmlSchemaSimpleType((XmlSchemaSimpleType)o.SchemaType); } this.WriteSortedItems(o.Constraints); this.WriteEndElement(); } }