public static NBatchInfo FromPBMsg(MsgBatchInfo input) { NBatchInfo nBatchInfo = new NBatchInfo(); nBatchInfo.Author = input.Author1; nBatchInfo.Version = input.Version2; //nBatchInfo.CreateDate = input.CreateDate3; nBatchInfo.CreateTime = input.CreateTime4; nBatchInfo.Remark = input.Remark5; nBatchInfo.BatchNO = input.BatchNO6; nBatchInfo.Title = input.Title7; nBatchInfo.Operation = input.Operation8; //FileInfos = input.Fileinfos9List.Select<MsgFileInfo, NFileInfo>((<> c.<> 9__106_0 ?? (<> c.<> 9__106_0 = new Func<MsgFileInfo, NFileInfo>(<> c.<> 9.< FromPBMsg > b__106_0)))).ToList<NFileInfo>(), nBatchInfo.FileInfos = input.FileInfos9List.Select <MsgFileInfo, NFileInfo>(o => NFileInfo.FromPBMsg(o)).ToList <NFileInfo>(); nBatchInfo.OrgID = input.OrgID10; nBatchInfo.BusiSysId = input.BusiSysId11; nBatchInfo.BusiTypeId = input.BusiTypeId12; nBatchInfo.BarCode = input.BarCode13; nBatchInfo.SourceIP = input.SourceIP14; nBatchInfo.MachineID = input.MachineID15; nBatchInfo.Password = input.Password16; nBatchInfo.Editable = input.Editable18; nBatchInfo.ExShenheResult = input.ExShenheResult19; nBatchInfo.ExShenheRemark = input.ExShenheRemark20; return(nBatchInfo); }
public void ToPBFile(string fname, string transMode) { MsgBatchInfo msgBatchInfo = this.ToPBMsg(transMode); File.WriteAllBytes(fname, msgBatchInfo.ToByteArray()); }
public static NBatchInfo FromPBFile(string fname) { MsgBatchInfo input = MsgBatchInfo.ParseFrom(File.ReadAllBytes(fname)); return(NBatchInfo.FromPBMsg(input)); }
public void ToPBFile(string fname, bool includefiledata = true) { MsgBatchInfo msgBatchInfo = this.ToPBMsg(includefiledata); File.WriteAllBytes(fname, msgBatchInfo.ToByteArray()); }