private void Write11_XmlSchemaAnnotation(string n, string ns, XmlSchemaAnnotation o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } } else { if (!needType && !(o.GetType() == typeof(XmlSchemaAnnotation))) { throw base.CreateUnknownTypeException(o); } base.EscapeName = false; base.WriteStartElement(n, ns, o, false, o.Namespaces); if (needType) { base.WriteXsiType("XmlSchemaAnnotation", "http://www.w3.org/2001/XMLSchema"); } base.WriteAttribute("id", "", o.Id); XmlAttribute[] unhandledAttributes = o.UnhandledAttributes; if (unhandledAttributes != null) { for (int i = 0; i < unhandledAttributes.Length; i++) { XmlAttribute node = unhandledAttributes[i]; base.WriteXmlAttribute(node, o); } } XmlSchemaObjectCollection items = o.Items; if (items != null) { for (int j = 0; j < items.Count; j++) { XmlSchemaObject obj2 = items[j]; if (obj2 is XmlSchemaAppInfo) { this.Write10_XmlSchemaAppInfo("appinfo", "http://www.w3.org/2001/XMLSchema", (XmlSchemaAppInfo) obj2, false, false); } else if (obj2 is XmlSchemaDocumentation) { this.Write9_XmlSchemaDocumentation("documentation", "http://www.w3.org/2001/XMLSchema", (XmlSchemaDocumentation) obj2, false, false); } else if (obj2 != null) { throw base.CreateUnknownTypeException(obj2); } } } base.WriteEndElement(o); } }