private void Write5_ServerTaskInfoEntry(string n, string ns, ServerTaskInfoEntry o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } return; } if (!needType) { Type type = o.GetType(); if (!(type == typeof(ServerTaskInfoEntry))) { throw base.CreateUnknownTypeException(o); } } base.WriteStartElement(n, ns, o, false, null); if (needType) { base.WriteXsiType("ServerTaskInfoEntry", ""); } base.WriteAttribute("UseStandaloneTask", "", XmlConvert.ToString(o.UseStandaloneTask)); if (o.Task != null) { base.WriteValue(o.Task); } base.WriteEndElement(o); }
private ServerTaskInfoEntry Read5_ServerTaskInfoEntry(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.id24_ServerTaskInfoEntry || xmlQualifiedName.Namespace != this.id2_Item)) { throw base.CreateUnknownTypeException(xmlQualifiedName); } if (flag) { return(null); } ServerTaskInfoEntry serverTaskInfoEntry = new ServerTaskInfoEntry(); bool[] array = new bool[2]; while (base.Reader.MoveToNextAttribute()) { if (!array[1] && base.Reader.LocalName == this.id25_UseStandaloneTask && base.Reader.NamespaceURI == this.id2_Item) { serverTaskInfoEntry.UseStandaloneTask = XmlConvert.ToBoolean(base.Reader.Value); array[1] = true; } else if (!base.IsXmlnsAttribute(base.Reader.Name)) { base.UnknownNode(serverTaskInfoEntry, ":UseStandaloneTask"); } } base.Reader.MoveToElement(); if (base.Reader.IsEmptyElement) { base.Reader.Skip(); return(serverTaskInfoEntry); } base.Reader.ReadStartElement(); base.Reader.MoveToContent(); int num = 0; int readerCount = base.ReaderCount; while (base.Reader.NodeType != XmlNodeType.EndElement && base.Reader.NodeType != XmlNodeType.None) { string text = null; if (base.Reader.NodeType == XmlNodeType.Element) { base.UnknownNode(serverTaskInfoEntry, ""); } else if (base.Reader.NodeType == XmlNodeType.Text || base.Reader.NodeType == XmlNodeType.CDATA || base.Reader.NodeType == XmlNodeType.Whitespace || base.Reader.NodeType == XmlNodeType.SignificantWhitespace) { text = base.ReadString(text, false); serverTaskInfoEntry.Task = text; } else { base.UnknownNode(serverTaskInfoEntry, ""); } base.Reader.MoveToContent(); base.CheckReaderCount(ref num, ref readerCount); } base.ReadEndElement(); return(serverTaskInfoEntry); }