Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# I';我正在尝试导入LotusNotes结构化文本,作为一些可以执行linq查询的数据_C#_Linq_Parsing_Serialization - Fatal编程技术网

C# I';我正在尝试导入LotusNotes结构化文本,作为一些可以执行linq查询的数据

C# I';我正在尝试导入LotusNotes结构化文本,作为一些可以执行linq查询的数据,c#,linq,parsing,serialization,C#,Linq,Parsing,Serialization,我甚至不太确定如何处理这个问题,但这是我的问题。如何处理这个问题: 我有很多(100000个)这样的例子,需要将尽可能多的数据提取到数据类型的各种成员/列表中。因为它不是JSON或XML,我认为我没有反序列化选项。也许regex以某种方式可以提取到用户定义的数据类中 Status: In Process Prefix: 18- PlantLoc: Lewiston Date: 08/10/2018 Department: FT Time: 08/10/2018 02:08:30 PM

我甚至不太确定如何处理这个问题,但这是我的问题。如何处理这个问题:

我有很多(100000个)这样的例子,需要将尽可能多的数据提取到数据类型的各种成员/列表中。因为它不是JSON或XML,我认为我没有反序列化选项。也许regex以某种方式可以提取到用户定义的数据类中

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 
这是可行的,但如何添加“仅适用于Value=“ServiceTech”&&Key=named“Walter”:


您甚至不需要正则表达式——只需逐行使用数据,在第一个冒号上分解以获得键值对,然后将数据插入数据存储。您的数据库使用SQL吗?事实上,这些项可能存储在普通的关系数据库中,除非Lotus提供了您想要使用的特定内容。如果记录不完全相同,您可能应该使用
字典来代替类。@halfer-如何“在第一个冒号上分解”?那么“Solution_1:”需要进一步处理以适应字典方案呢?一般来说,您的数据似乎是一组键值对,可以使用脚本将其插入数据库。也许在大多数情况下,您可以将每个值视为一个字符串,表中每个列的类型将决定它是整数、浮点、字符串还是日期(等等)。但是,这并不意味着不能对选定的关键点进行任何预处理。因此,对于
解决方案_1
,如果这是一个对象,则可以使用脚本将其中的关键帧展平到顶级关键帧,或者在插入之前执行一些其他处理。
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");