public override void WriteObject(XmlWriter writer, object graph) { ArrayOfFileInfo ArrayOfFileInfoField = ((ArrayOfFileInfo)(graph)); if (WriteParentElement(writer, true, true, graph)) { FileInfoDataContractSerializer FileInfoDCS = new FileInfoDataContractSerializer("FileInfo", "http://schemas.datacontract.org/2004/07/WcfMtomService", "http://schemas.datacontract.org/2004/07/WcfMtomService"); for (int i = 0; (i < ArrayOfFileInfoField.FileInfo.Length); i = (i + 1)) { FileInfoDCS.WriteObject(writer, ArrayOfFileInfoField.FileInfo[i]); } writer.WriteEndElement(); } return; }
public override object ReadObject(XmlReader reader) { ArrayOfFileInfo ArrayOfFileInfoField = null; if (IsParentStartElement(reader, false, true)) { ArrayOfFileInfoField = new ArrayOfFileInfo(); reader.Read(); FileInfoDataContractSerializer FileInfoDCS = new FileInfoDataContractSerializer("FileInfo", "http://schemas.datacontract.org/2004/07/WcfMtomService", "http://schemas.datacontract.org/2004/07/WcfMtomService"); System.Collections.ArrayList FileInfo_List = new System.Collections.ArrayList(); for (int i = 0; (i > -1); i = (i + 1)) { if (!IsChildStartElement(reader, "FileInfo", false, false)) { ArrayOfFileInfoField.FileInfo = new FileInfo[FileInfo_List.Count]; FileInfo_List.CopyTo(ArrayOfFileInfoField.FileInfo); break; } FileInfo_List.Add(((FileInfo)(FileInfoDCS.ReadObject(reader)))); } reader.ReadEndElement(); } return(ArrayOfFileInfoField); }
public override object ReadObject(XmlReader reader) { ArrayOfFileInfo ArrayOfFileInfoField = null; if (IsParentStartElement(reader, false, true)) { ArrayOfFileInfoField = new ArrayOfFileInfo(); reader.Read(); FileInfoDataContractSerializer FileInfoDCS = new FileInfoDataContractSerializer("FileInfo", "http://schemas.datacontract.org/2004/07/WcfMtomService", "http://schemas.datacontract.org/2004/07/WcfMtomService"); System.Collections.ArrayList FileInfo_List = new System.Collections.ArrayList(); for (int i = 0; (i > -1); i = (i + 1)) { if (!IsChildStartElement(reader, "FileInfo", false, false)) { ArrayOfFileInfoField.FileInfo = new FileInfo[FileInfo_List.Count]; FileInfo_List.CopyTo(ArrayOfFileInfoField.FileInfo); break; } FileInfo_List.Add(((FileInfo)(FileInfoDCS.ReadObject(reader)))); } reader.ReadEndElement(); } return ArrayOfFileInfoField; }