diff --git a/README.md b/README.md
index a584d2b8..b3142bf3 100644
--- a/README.md
+++ b/README.md
@@ -40,6 +40,7 @@ For more info, see also this WIKI page: [What is WireMock.Net](https://github.co
| | Official | Preview [:information_source:](https://github.com/wiremock/WireMock.Net/wiki/MyGet-preview-versions) |
| - | - | - |
| **WireMock.Net** | [](https://www.nuget.org/packages/WireMock.Net) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net)
+| **WireMock.Net.Minimal** 🔺| [](https://www.nuget.org/packages/WireMock.Net.Minimal) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.Minimal)
| **WireMock.Net.StandAlone** | [](https://www.nuget.org/packages/WireMock.Net.StandAlone) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.StandAlone)
| **WireMock.Net.Testcontainers** | [](https://www.nuget.org/packages/WireMock.Net.Testcontainers) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.Testcontainers)
| **WireMock.Net.Aspire** | [](https://www.nuget.org/packages/WireMock.Net.Aspire) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.Aspire)
@@ -52,10 +53,15 @@ For more info, see also this WIKI page: [What is WireMock.Net](https://github.co
| | | |
| **WireMock.Net.Matchers.CSharpCode** | [](https://www.nuget.org/packages/WireMock.Net.Matchers.CSharpCode) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.Matchers.CSharpCode)
| **WireMock.Net.OpenApiParser** | [](https://www.nuget.org/packages/WireMock.Net.OpenApiParser) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.OpenApiParser)
+| **WireMock.Net.MimePart** | [](https://www.nuget.org/packages/WireMock.Net.MimePart) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.MimePart)
| | | |
| **WireMock.Net.RestClient** | [](https://www.nuget.org/packages/WireMock.Net.RestClient) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.RestClient)
| **WireMock.Org.RestClient** | [](https://www.nuget.org/packages/WireMock.Org.RestClient) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Org.RestClient)
+
+
+🔺 **WireMock.Net.Minimal** does not include: **WireMock.Net.MimePart**
+
---
## :exclamation: Breaking changes
@@ -65,6 +71,7 @@ A breaking change is introduced which is related to System.Linq.Dynamic.Core Dyn
- The `LinqMatcher` is not allowed.
- The [Handlebars.Net.Helpers.DynamicLinq](https://www.nuget.org/packages/Handlebars.Net.Helpers.DynamicLinq) package is not included anymore.
+
### 1.8.0
Some breaking changes are introduced in this version:
diff --git a/WireMock.Net Solution.sln b/WireMock.Net Solution.sln
index 7965831f..d02f17b7 100644
--- a/WireMock.Net Solution.sln
+++ b/WireMock.Net Solution.sln
@@ -130,6 +130,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.AwesomeAsserti
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.OpenApiParser", "src\WireMock.Net.OpenApiParser\WireMock.Net.OpenApiParser.csproj", "{E5B03EEF-822C-4295-952B-4479AD30082B}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.MimePart", "src\WireMock.Net.MimePart\WireMock.Net.MimePart.csproj", "{F8B4A93E-46EF-4237-88FE-15FDAB7635D4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.Shared", "src\WireMock.Net.Shared\WireMock.Net.Shared.csproj", "{D3804228-91F4-4502-9595-39584E5A0177}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.Minimal", "src\WireMock.Net.Minimal\WireMock.Net.Minimal.csproj", "{BFEF8990-65B3-4274-310F-7355F0B84035}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -308,6 +314,18 @@ Global
{E5B03EEF-822C-4295-952B-4479AD30082B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5B03EEF-822C-4295-952B-4479AD30082B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5B03EEF-822C-4295-952B-4479AD30082B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F8B4A93E-46EF-4237-88FE-15FDAB7635D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F8B4A93E-46EF-4237-88FE-15FDAB7635D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F8B4A93E-46EF-4237-88FE-15FDAB7635D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F8B4A93E-46EF-4237-88FE-15FDAB7635D4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D3804228-91F4-4502-9595-39584E5A0177}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D3804228-91F4-4502-9595-39584E5A0177}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D3804228-91F4-4502-9595-39584E5A0177}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D3804228-91F4-4502-9595-39584E5A0177}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BFEF8990-65B3-4274-310F-7355F0B84035}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BFEF8990-65B3-4274-310F-7355F0B84035}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BFEF8990-65B3-4274-310F-7355F0B84035}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BFEF8990-65B3-4274-310F-7355F0B84035}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -358,6 +376,9 @@ Global
{A5FEF4F7-7DA2-4962-89A8-16BA942886E5} = {0BB8B634-407A-4610-A91F-11586990767A}
{7753670F-7C7F-44BF-8BC7-08325588E60C} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
{E5B03EEF-822C-4295-952B-4479AD30082B} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
+ {F8B4A93E-46EF-4237-88FE-15FDAB7635D4} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
+ {D3804228-91F4-4502-9595-39584E5A0177} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
+ {BFEF8990-65B3-4274-310F-7355F0B84035} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DC539027-9852-430C-B19F-FD035D018458}
diff --git a/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs b/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs
index 8265a81f..7aeb2bb8 100644
--- a/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs
+++ b/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs
@@ -339,8 +339,8 @@ namespace WireMock.Net.ConsoleApplication
});
System.Console.WriteLine("WireMockServer listening at {0}", string.Join(",", server.Urls));
- //server.SetBasicAuthentication("a", "b");
- server.SetAzureADAuthentication(Environment.GetEnvironmentVariable("WIREMOCK_AAD_TENANT")!, "api://e083d51a-01a6-446c-8ad5-0c5c7f002208");
+ server.SetBasicAuthentication("a", "b");
+ //server.SetAzureADAuthentication(Environment.GetEnvironmentVariable("WIREMOCK_AAD_TENANT")!, "api://e083d51a-01a6-446c-8ad5-0c5c7f002208");
//var http = new HttpClient();
//var response = await http.GetAsync($"{_wireMockServer.Url}/pricing");
diff --git a/src/WireMock.Net/Models/StringPattern.cs b/src/WireMock.Net.Abstractions/Models/StringPattern.cs
similarity index 100%
rename from src/WireMock.Net/Models/StringPattern.cs
rename to src/WireMock.Net.Abstractions/Models/StringPattern.cs
diff --git a/src/WireMock.Net.Abstractions/Properties/AssemblyInfo.cs b/src/WireMock.Net.Abstractions/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..0f6668a5
--- /dev/null
+++ b/src/WireMock.Net.Abstractions/Properties/AssemblyInfo.cs
@@ -0,0 +1,8 @@
+// Copyright © WireMock.Net
+
+using System.Runtime.CompilerServices;
+
+[assembly: InternalsVisibleTo("WireMock.Net.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100e138ec44d93acac565953052636eb8d5e7e9f27ddb030590055cd1a0ab2069a5623f1f77ca907d78e0b37066ca0f6d63da7eecc3fcb65b76aa8ebeccf7ebe1d11264b8404cd9b1cbbf2c83f566e033b3e54129f6ef28daffff776ba7aebbc53c0d635ebad8f45f78eb3f7e0459023c218f003416e080f96a1a3c5ffeb56bee9e")]
+
+// Needed for Moq in the UnitTest project
+[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]
\ No newline at end of file
diff --git a/src/WireMock.Net.Abstractions/WireMock.Net.Abstractions.csproj b/src/WireMock.Net.Abstractions/WireMock.Net.Abstractions.csproj
index 4b010184..49e7fae7 100644
--- a/src/WireMock.Net.Abstractions/WireMock.Net.Abstractions.csproj
+++ b/src/WireMock.Net.Abstractions/WireMock.Net.Abstractions.csproj
@@ -1,7 +1,7 @@
-
+
- Commonly used models, enumerations and types.
+ Commonly used interfaces, models, enumerations and types.
WireMock.Net.Abstractions
Stef Heyenrath
net45;net451;net461;netstandard1.3;netstandard2.0;netstandard2.1
@@ -17,7 +17,6 @@
true
true
true
- ../WireMock.Net/WireMock.Net.ruleset
true
../WireMock.Net/WireMock.Net.snk
@@ -25,6 +24,10 @@
MIT
+
+ ../WireMock.Net/WireMock.Net.ruleset
+
+
true
@@ -35,37 +38,46 @@
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
+
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/WireMock.Net.AspNetCore.Middleware/WireMock.Net.AspNetCore.Middleware.csproj b/src/WireMock.Net.AspNetCore.Middleware/WireMock.Net.AspNetCore.Middleware.csproj
index 08d5571e..4e54e6bd 100644
--- a/src/WireMock.Net.AspNetCore.Middleware/WireMock.Net.AspNetCore.Middleware.csproj
+++ b/src/WireMock.Net.AspNetCore.Middleware/WireMock.Net.AspNetCore.Middleware.csproj
@@ -1,4 +1,4 @@
-
+
enable
@@ -16,7 +16,6 @@
true
true
true
- ../WireMock.Net/WireMock.Net.ruleset
true
../WireMock.Net/WireMock.Net.snk
true
@@ -25,6 +24,10 @@
../../resources/WireMock.Net-LogoAspire.ico
+
+ ../WireMock.Net/WireMock.Net.ruleset
+
+
true
diff --git a/src/WireMock.Net.Aspire/WireMock.Net.Aspire.csproj b/src/WireMock.Net.Aspire/WireMock.Net.Aspire.csproj
index 7fd91ef2..a835e090 100644
--- a/src/WireMock.Net.Aspire/WireMock.Net.Aspire.csproj
+++ b/src/WireMock.Net.Aspire/WireMock.Net.Aspire.csproj
@@ -1,4 +1,4 @@
-
+
enable
@@ -16,7 +16,6 @@
true
true
true
- ../WireMock.Net/WireMock.Net.ruleset
true
../WireMock.Net/WireMock.Net.snk
true
@@ -31,9 +30,13 @@
-
+
+
+ ../WireMock.Net/WireMock.Net.ruleset
+
+
true
diff --git a/src/WireMock.Net.AwesomeAssertions/WireMock.Net.AwesomeAssertions.csproj b/src/WireMock.Net.AwesomeAssertions/WireMock.Net.AwesomeAssertions.csproj
index 5bebc1a1..c4b9f5e2 100644
--- a/src/WireMock.Net.AwesomeAssertions/WireMock.Net.AwesomeAssertions.csproj
+++ b/src/WireMock.Net.AwesomeAssertions/WireMock.Net.AwesomeAssertions.csproj
@@ -16,7 +16,6 @@
true
true
true
- ../WireMock.Net/WireMock.Net.ruleset
true
../WireMock.Net/WireMock.Net.snk
@@ -24,6 +23,10 @@
MIT
+
+ ../WireMock.Net/WireMock.Net.ruleset
+
+
true
diff --git a/src/WireMock.Net.FluentAssertions/WireMock.Net.FluentAssertions.csproj b/src/WireMock.Net.FluentAssertions/WireMock.Net.FluentAssertions.csproj
index c8d40372..d72d4d61 100644
--- a/src/WireMock.Net.FluentAssertions/WireMock.Net.FluentAssertions.csproj
+++ b/src/WireMock.Net.FluentAssertions/WireMock.Net.FluentAssertions.csproj
@@ -1,4 +1,4 @@
-
+
FluentAssertions extensions for WireMock.Net
@@ -16,7 +16,6 @@
true
true
true
- ../WireMock.Net/WireMock.Net.ruleset
true
../WireMock.Net/WireMock.Net.snk
@@ -24,6 +23,10 @@
MIT
+
+ ../WireMock.Net/WireMock.Net.ruleset
+
+
true
diff --git a/src/WireMock.Net.Matchers.CSharpCode/Matchers/CSharpCodeMatcher.cs b/src/WireMock.Net.Matchers.CSharpCode/Matchers/CSharpCodeMatcher.cs
index cdb4a3f4..f3a9a68c 100644
--- a/src/WireMock.Net.Matchers.CSharpCode/Matchers/CSharpCodeMatcher.cs
+++ b/src/WireMock.Net.Matchers.CSharpCode/Matchers/CSharpCodeMatcher.cs
@@ -25,13 +25,13 @@ internal class CSharpCodeMatcher : ICSharpCodeMatcher
private const string TemplateForIsMatchWithDynamic = "public class CodeHelper {{ public bool IsMatch(dynamic it) {{ {0} }} }}";
private readonly string[] _usings =
- {
+ [
"System",
"System.Linq",
"System.Collections.Generic",
"Microsoft.CSharp",
"Newtonsoft.Json.Linq"
- };
+ ];
///
public MatchBehaviour MatchBehaviour { get; }
diff --git a/src/WireMock.Net.Matchers.CSharpCode/WireMock.Net.Matchers.CSharpCode.csproj b/src/WireMock.Net.Matchers.CSharpCode/WireMock.Net.Matchers.CSharpCode.csproj
index 2f412e6b..319ba1db 100644
--- a/src/WireMock.Net.Matchers.CSharpCode/WireMock.Net.Matchers.CSharpCode.csproj
+++ b/src/WireMock.Net.Matchers.CSharpCode/WireMock.Net.Matchers.CSharpCode.csproj
@@ -1,49 +1,52 @@
-
+
-
- A CSharpCodeMatcher which can be used to match WireMock.Net Requests using C# code.
- WireMock.Net.Matchers.CSharpCode
- Stef Heyenrath
- net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0
- true
- wiremock;matchers;matcher;csharp;csharpcode
- WireMock
- {B6269AAC-170A-4346-8B9A-444DED3D9A44}
- true
- $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
- true
- true
- true
- ../WireMock.Net/WireMock.Net.ruleset
- true
- ../WireMock.Net/WireMock.Net.snk
-
- true
- MIT
-
+
+ A CSharpCodeMatcher which can be used to match WireMock.Net Requests using C# code.
+ WireMock.Net.Matchers.CSharpCode
+ Stef Heyenrath
+ net451;net452;net46;net461;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0
+ true
+ wiremock;matchers;matcher;csharp;csharpcode
+ WireMock
+ {B6269AAC-170A-4346-8B9A-444DED3D9A44}
+ true
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
+ true
+ true
+ true
+ true
+ ../WireMock.Net/WireMock.Net.snk
+
+ true
+ MIT
+
-
- true
-
+
+ ../WireMock.Net/WireMock.Net.ruleset
+
-
-
-
+
+ true
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/WireMock.Net.MimePart/ILRepack.targets b/src/WireMock.Net.MimePart/ILRepack.targets
new file mode 100644
index 00000000..1e2e0929
--- /dev/null
+++ b/src/WireMock.Net.MimePart/ILRepack.targets
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/WireMock.Net/Matchers/MimePartMatcher.cs b/src/WireMock.Net.MimePart/Matchers/MimePartMatcher.cs
similarity index 79%
rename from src/WireMock.Net/Matchers/MimePartMatcher.cs
rename to src/WireMock.Net.MimePart/Matchers/MimePartMatcher.cs
index 6b41413b..6ad739ff 100644
--- a/src/WireMock.Net/Matchers/MimePartMatcher.cs
+++ b/src/WireMock.Net.MimePart/Matchers/MimePartMatcher.cs
@@ -1,12 +1,8 @@
// Copyright © WireMock.Net
-#if MIMEKIT
using System;
using MimeKit;
-using WireMock.Extensions;
-using WireMock.Matchers;
using WireMock.Matchers.Helpers;
-using WireMock.Models;
using WireMock.Util;
namespace WireMock.Matchers;
@@ -14,31 +10,23 @@ namespace WireMock.Matchers;
///
/// MimePartMatcher
///
-public class MimePartMatcher : IMatcher
+public class MimePartMatcher : IMimePartMatcher
{
private readonly Func[] _funcs;
///
public string Name => nameof(MimePartMatcher);
- ///
- /// ContentType Matcher (image/png; name=image.png.)
- ///
+ ///
public IStringMatcher? ContentTypeMatcher { get; }
- ///
- /// ContentDisposition Matcher (attachment; filename=image.png)
- ///
+ ///
public IStringMatcher? ContentDispositionMatcher { get; }
- ///
- /// ContentTransferEncoding Matcher (base64)
- ///
+ ///
public IStringMatcher? ContentTransferEncodingMatcher { get; }
- ///
- /// Content Matcher
- ///
+ ///
public IMatcher? ContentMatcher { get; }
///
@@ -70,19 +58,15 @@ public class MimePartMatcher : IMatcher
];
}
- ///
- /// Determines whether the specified MimePart is match.
- ///
- /// The MimePart.
- /// A value between 0.0 - 1.0 of the similarity.
- public MatchResult IsMatch(MimePart mimePart)
+ ///
+ public MatchResult IsMatch(object value)
{
var score = MatchScores.Mismatch;
Exception? exception = null;
try
{
- if (Array.TrueForAll(_funcs, func => func(mimePart).IsPerfect()))
+ if (value is MimePart mimePart && Array.TrueForAll(_funcs, func => func(mimePart).IsPerfect()))
{
score = MatchScores.Perfect;
}
@@ -125,5 +109,4 @@ public class MimePartMatcher : IMatcher
{
return contentType?.ToString().Replace("Content-Type: ", string.Empty);
}
-}
-#endif
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/src/WireMock.Net.MimePart/Properties/AssemblyInfo.cs b/src/WireMock.Net.MimePart/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..fb354ea5
--- /dev/null
+++ b/src/WireMock.Net.MimePart/Properties/AssemblyInfo.cs
@@ -0,0 +1,5 @@
+// Copyright © WireMock.Net
+
+using System.Runtime.CompilerServices;
+
+[assembly: InternalsVisibleTo("WireMock.Net.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100e138ec44d93acac565953052636eb8d5e7e9f27ddb030590055cd1a0ab2069a5623f1f77ca907d78e0b37066ca0f6d63da7eecc3fcb65b76aa8ebeccf7ebe1d11264b8404cd9b1cbbf2c83f566e033b3e54129f6ef28daffff776ba7aebbc53c0d635ebad8f45f78eb3f7e0459023c218f003416e080f96a1a3c5ffeb56bee9e")]
\ No newline at end of file
diff --git a/src/WireMock.Net/Util/MimeKitUtils.cs b/src/WireMock.Net.MimePart/Util/MimeKitUtils.cs
similarity index 70%
rename from src/WireMock.Net/Util/MimeKitUtils.cs
rename to src/WireMock.Net.MimePart/Util/MimeKitUtils.cs
index 91e22414..bd05f1e0 100644
--- a/src/WireMock.Net/Util/MimeKitUtils.cs
+++ b/src/WireMock.Net.MimePart/Util/MimeKitUtils.cs
@@ -1,7 +1,7 @@
// Copyright © WireMock.Net
-#if MIMEKIT
using System;
+using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
@@ -13,9 +13,16 @@ using WireMock.Types;
namespace WireMock.Util;
-internal static class MimeKitUtils
+internal class MimeKitUtils : IMimeKitUtils
{
- public static bool TryGetMimeMessage(IRequestMessage requestMessage, [NotNullWhen(true)] out MimeMessage? mimeMessage)
+ ///
+ public object LoadFromStream(Stream stream)
+ {
+ return MimeMessage.Load(Guard.NotNull(stream));
+ }
+
+ ///
+ public bool TryGetMimeMessage(IRequestMessage requestMessage, [NotNullWhen(true)] out object? mimeMessage)
{
Guard.NotNull(requestMessage);
@@ -37,7 +44,7 @@ internal static class MimeKitUtils
var fixedBytes = FixBytes(bytes, contentTypeHeader[0]);
- mimeMessage = MimeMessage.Load(new MemoryStream(fixedBytes));
+ mimeMessage = LoadFromStream(new MemoryStream(fixedBytes));
return true;
}
@@ -45,6 +52,19 @@ internal static class MimeKitUtils
return false;
}
+ ///
+ public IReadOnlyList