ok

alphons <alphons@heijden.com> 23 Feb 2025, 10:32
0c4333cc0d9e1f51acf35aa2d8b2d3f8204377b1
10 files changed
  • Eml2MimePart/Eml2MimePart.csproj
  • Eml2MimePart/MimePart.cs
  • Eml2MimePart/QuotedPrintableDecoder.cs
  • Eml2MimePart/RegexHelper.cs
  • Eml2Pdf.sln
  • EmlFastDecoder/EmlFastDecoder.csproj
  • EmlFastDecoder/MimePart.cs
  • EmlFastDecoder/Program.cs
  • EmlFastDecoder/QuotedPrintableDecoder.cs
  • EmlFastDecoder/RegexHelper.cs
diff --git a/Eml2MimePart/Eml2MimePart.csproj b/Eml2MimePart/Eml2MimePart.csproj
new file mode 100644
index 0000000..fa71b7a
--- /dev/null
+++ b/Eml2MimePart/Eml2MimePart.csproj
@@ -0,0 +1,9 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>net8.0</TargetFramework>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ </PropertyGroup>
+
+</Project>
diff --git a/EmlFastDecoder/MimePart.cs b/Eml2MimePart/MimePart.cs
similarity index 98%
rename from EmlFastDecoder/MimePart.cs
rename to Eml2MimePart/MimePart.cs
index facb70f..cf576ae 100644
--- a/EmlFastDecoder/MimePart.cs
+++ b/Eml2MimePart/MimePart.cs
@@ -1,6 +1,7 @@
-using System.Text;
+using EmlFastDecoder;
+using System.Text;
-namespace EmlFastDecoder;
+namespace Eml2MimePart;
public class MimePart(string[] lines)
{
private const int InvalidIndex = -1;
@@ -110,8 +111,8 @@ public class MimePart(string[] lines)
var disposition = this["Content-Disposition"];
if (!string.IsNullOrEmpty(disposition) && disposition.Split(';')[0].Trim().Equals("attachment", StringComparison.OrdinalIgnoreCase))
{
- return
- [
+ return
+ [
new(_lines)
{
_start = _startContent,
diff --git a/EmlFastDecoder/QuotedPrintableDecoder.cs b/Eml2MimePart/QuotedPrintableDecoder.cs
similarity index 97%
rename from EmlFastDecoder/QuotedPrintableDecoder.cs
rename to Eml2MimePart/QuotedPrintableDecoder.cs
index f4b7565..3019cc7 100644
--- a/EmlFastDecoder/QuotedPrintableDecoder.cs
+++ b/Eml2MimePart/QuotedPrintableDecoder.cs
@@ -1,6 +1,6 @@
using System.Text;
-namespace EmlFastDecoder;
+namespace Eml2MimePart;
public static class QuotedPrintableDecoder
{
diff --git a/EmlFastDecoder/RegexHelper.cs b/Eml2MimePart/RegexHelper.cs
similarity index 95%
rename from EmlFastDecoder/RegexHelper.cs
rename to Eml2MimePart/RegexHelper.cs
index 0297a96..3bf40ec 100644
--- a/EmlFastDecoder/RegexHelper.cs
+++ b/Eml2MimePart/RegexHelper.cs
@@ -1,6 +1,6 @@
using System.Text.RegularExpressions;
-namespace EmlFastDecoder;
+namespace Eml2MimePart;
public partial class RegexHelper
{
diff --git a/Eml2Pdf.sln b/Eml2Pdf.sln
index 04e4ba6..1af26b7 100644
--- a/Eml2Pdf.sln
+++ b/Eml2Pdf.sln
@@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eml2PdfWinApp", "Eml2PdfWin
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EmlFastDecoder", "EmlFastDecoder\EmlFastDecoder.csproj", "{7457C78E-ABB7-455C-9BAE-46040997C2B4}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eml2MimePart", "Eml2MimePart\Eml2MimePart.csproj", "{6E7CB274-7632-4D7D-B3CC-4EDE7AFEB6A9}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -27,6 +29,10 @@ Global
{7457C78E-ABB7-455C-9BAE-46040997C2B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7457C78E-ABB7-455C-9BAE-46040997C2B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7457C78E-ABB7-455C-9BAE-46040997C2B4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E7CB274-7632-4D7D-B3CC-4EDE7AFEB6A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E7CB274-7632-4D7D-B3CC-4EDE7AFEB6A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E7CB274-7632-4D7D-B3CC-4EDE7AFEB6A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E7CB274-7632-4D7D-B3CC-4EDE7AFEB6A9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/EmlFastDecoder/EmlFastDecoder.csproj b/EmlFastDecoder/EmlFastDecoder.csproj
index f7a800c..15aa4b7 100644
--- a/EmlFastDecoder/EmlFastDecoder.csproj
+++ b/EmlFastDecoder/EmlFastDecoder.csproj
@@ -7,6 +7,10 @@
<Nullable>enable</Nullable>
</PropertyGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Eml2MimePart\Eml2MimePart.csproj" />
+ </ItemGroup>
+
<ItemGroup>
<None Update="input\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
diff --git a/EmlFastDecoder/Program.cs b/EmlFastDecoder/Program.cs
index 0281464..589698d 100644
--- a/EmlFastDecoder/Program.cs
+++ b/EmlFastDecoder/Program.cs
@@ -1,4 +1,5 @@
-using EmlFastDecoder;
+using Eml2MimePart;
+
using System.Diagnostics;
static async Task ShowPartsAsync(int Depth, MimePart part)