问题
I"m not even really too sure how to approach this, but that's my question. How to approach this:
I have many (10000s) of these examples and need to extract as much data as possible into various members/lists of a data type. Since it's not JSON or XML I don't think I have deserialize options. Maybe regex somehow into a user-defined class of data?
Status: In Process
Prefix: 18-
PlantLoc: Lewiston
Date: 08/10/2018
Department: FT
Time: 08/10/2018 02:08:30 PM
StationID: 177
Fixture: initialization
Supervisor: Da Mi
PMOnly:
PartNo: 0735
SerialNum:
FailedStep: Validate/Validate firmware
Reason: Script
OtherReason:
Details: Initalization failure
Urgency: Script Problem
Date_1: 08/10/2018
Time_1: 08/10/2018 04:24:06 PM
Date_2:
Time_2:
ProblemFound:
SolutionCode:
Solution: 8/14/2018 TSR SSR 18-07121 was also entered. 8/14/2018 GAH. The 735 units with B1492-6 boards fail during Test Flash possibly due to a timing issue in the script. These particular board types have 1GB of flash and take longer for the flash test. I will need to contact TMESoftware to see if the WAIT time can be increased for the 735 units with B1492-6-XX boards. 8/14/2018 GAH. Details: https://jira.metro.ad.selinc.com/browse/MTEN-1814
ServiceTechHrs:
ServiceEngHrs:
DocHistory: Assignee #1 xxxxx xxxxx assigned by Alex xxxxx on 08/10/2018,Request submitted by xxxxx on 08/10/2018,Request created by xxxxx Olander on 08/10/2018
Mailed: 1
CloseDate:
HoldOn:
HoldOff:
Authors: *
ISAuthors: IS Notes Developers; LocalDomainAdmins; LocalDomainServers
MgrData:
SaveOptions: 1
IniDate: 08/10/2018
IniTime: 08/10/2018 02:08:30 PM
MOT:
RequestNum: 07011
Initiator: xxxxx xxxxx
Notification: LWS Flex Leaders
ServiceTech: xxxxx xxxxx
ServiceEng:
SolutionCode_1:
FixtureCheck: Stop
Solution_1: 8/14/2018 TSR SSR 18-07121 was also entered. 8/14/2018 GAH. The 735 units with B1492-6 boards fail during Test Flash possibly due to a timing issue in the script. These particular board types have 1GB of flash and take longer for the flash test. I will need to contact TMESofre to see if the WAIT time can be increased for the 735 units with B1492-6-XX boards. 8/14/2018 GAH. Details: https://jira.metro.ad.com/browse/MTEN-1814
$Revisions: 08/10/2018 02:17:28 PM,08/10/2018 02:17:29 PM,08/10/2018 04:24:06 PM,08/10/2018 04:24:07 PM,08/13/2018 08:34:47 AM,08/14/2018 02:59:06 PM,08/14/2018 03:02:59 PM
SupDoc: SSR 18-07121
This works, but how to add "only for Value="ServiceTech" && Key=named "Walter":
var bleh = SSRList.Where(x => x.ContainsKey("ServiceTechHrs"))
.Select(x => x["ServiceTechHrs"])
.Where(x => x != "")
.Sum(x => Convert.ToDouble(x))
.Dump("Total All Tech Hours");
来源:https://stackoverflow.com/questions/51887318/im-trying-to-import-lotus-notes-structured-text-as-some-data-i-can-perform-linq