public static NewSegdata Deserialize(MultiPartFile file) { NewSegdata nsd = new NewSegdata(); nsd.Iterations = file.ReadUInt16(); nsd.TotalBytes = file.ReadUInt16(); nsd.IteratedDataBytes = file.ReadChar(); nsd.DataBytes = (char)BitConverter.GetBytes(nsd.Iterations)[0]; return(nsd); }
} // Reserved public static NewRlc Deserialize(MultiPartFile file) { NewRlc nr = new NewRlc(); nr.SourceType = file.ReadChar(); nr.Flags = file.ReadChar(); nr.SourceOffset = file.ReadUInt16(); // nr_intref nr.TargetSegmentNumber = file.ReadChar(); nr.Reserved1 = file.ReadChar(); nr.TargetEntryTableOffset = file.ReadUInt16(); // nr_import nr.ModuleReferenceTableIndex = BitConverter.ToUInt16(new byte[] { (byte)nr.SourceType, (byte)nr.Flags }, 0); nr.ProcedureOffset = nr.TargetEntryTableOffset; // nr_osfix nr.OperatingSystemFixupType = nr.ModuleReferenceTableIndex; nr.Reserved2 = nr.ProcedureOffset; return(nr); }