简体   繁体   English

如何在.NET中解析多部分消息

[英]How does one parse a multipart message in .NET

I have an MHTML file that I need to extract "sub-files" from. 我有一个MHTML文件,我需要从中提取“子文件”。 It appears that the .NET Framework 4.5 may have support for this, but I can't figure it out. 似乎.NET Framework 4.5可能对此提供支持,但我无法弄清楚。 I imagine it has something to do with the System.Net.Http.HttpContent class or one of its subclasses. 我想象它与System.Net.Http.HttpContent或其子之一有关。 I would show an attempt I have made at this myself, but I can't even find the starting point. 展示自己为此所做的尝试,但我什至找不到起点。 I wrote my own (buggy) parser, but there's just too many ifs, ands, and buts with the specification for one mortal to handle alone. 我编写了自己的(错误的)解析器,但是ifs和ands太多了,每个人只能单独处理一个规范。

您可能会发现此https://code.google.com/p/dotnetmimer/的一些用法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM