private void Write9_OrgTaskInfoBlock(string n, string ns, OrgTaskInfoBlock o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } return; } if (!needType) { Type type = o.GetType(); if (!(type == typeof(OrgTaskInfoBlock))) { throw base.CreateUnknownTypeException(o); } } base.WriteStartElement(n, ns, o, false, null); if (needType) { base.WriteXsiType("OrgTaskInfoBlock", ""); } base.WriteAttribute("DescriptionId", "", o.DescriptionId); base.WriteAttribute("UseInstallTasks", "", XmlConvert.ToString(o.UseInstallTasks)); base.WriteAttribute("Weight", "", XmlConvert.ToString(o.Weight)); base.WriteAttribute("IsFatal", "", XmlConvert.ToString(o.IsFatal)); this.Write8_OrgTaskInfoEntry("Global", "", o.Global, false, false); this.Write8_OrgTaskInfoEntry("Tenant", "", o.Tenant, false, false); base.WriteEndElement(o); }
private OrgTaskInfoBlock Read9_OrgTaskInfoBlock(bool isNullable, bool checkType) { XmlQualifiedName xmlQualifiedName = checkType ? base.GetXsiType() : null; bool flag = false; if (isNullable) { flag = base.ReadNull(); } if (checkType && !(xmlQualifiedName == null) && (xmlQualifiedName.Name != this.id27_OrgTaskInfoBlock || xmlQualifiedName.Namespace != this.id2_Item)) { throw base.CreateUnknownTypeException(xmlQualifiedName); } if (flag) { return(null); } OrgTaskInfoBlock orgTaskInfoBlock = new OrgTaskInfoBlock(); bool[] array = new bool[6]; while (base.Reader.MoveToNextAttribute()) { if (!array[0] && base.Reader.LocalName == this.id6_DescriptionId && base.Reader.NamespaceURI == this.id2_Item) { orgTaskInfoBlock.DescriptionId = base.Reader.Value; array[0] = true; } else if (!array[1] && base.Reader.LocalName == this.id20_UseInstallTasks && base.Reader.NamespaceURI == this.id2_Item) { orgTaskInfoBlock.UseInstallTasks = XmlConvert.ToBoolean(base.Reader.Value); array[1] = true; } else if (!array[2] && base.Reader.LocalName == this.id21_Weight && base.Reader.NamespaceURI == this.id2_Item) { orgTaskInfoBlock.Weight = XmlConvert.ToInt32(base.Reader.Value); array[2] = true; } else if (!array[3] && base.Reader.LocalName == this.id22_IsFatal && base.Reader.NamespaceURI == this.id2_Item) { orgTaskInfoBlock.IsFatal = XmlConvert.ToBoolean(base.Reader.Value); array[3] = true; } else if (!base.IsXmlnsAttribute(base.Reader.Name)) { base.UnknownNode(orgTaskInfoBlock, ":DescriptionId, :UseInstallTasks, :Weight, :IsFatal"); } } base.Reader.MoveToElement(); if (base.Reader.IsEmptyElement) { base.Reader.Skip(); return(orgTaskInfoBlock); } base.Reader.ReadStartElement(); base.Reader.MoveToContent(); int num = 0; int readerCount = base.ReaderCount; while (base.Reader.NodeType != XmlNodeType.EndElement && base.Reader.NodeType != XmlNodeType.None) { if (base.Reader.NodeType == XmlNodeType.Element) { if (!array[4] && base.Reader.LocalName == this.id28_Global && base.Reader.NamespaceURI == this.id2_Item) { orgTaskInfoBlock.Global = this.Read8_OrgTaskInfoEntry(false, true); array[4] = true; } else if (!array[5] && base.Reader.LocalName == this.id29_Tenant && base.Reader.NamespaceURI == this.id2_Item) { orgTaskInfoBlock.Tenant = this.Read8_OrgTaskInfoEntry(false, true); array[5] = true; } else { base.UnknownNode(orgTaskInfoBlock, ":Global, :Tenant"); } } else { base.UnknownNode(orgTaskInfoBlock, ":Global, :Tenant"); } base.Reader.MoveToContent(); base.CheckReaderCount(ref num, ref readerCount); } base.ReadEndElement(); return(orgTaskInfoBlock); }