Create WireMock.Net.MimePart project (#1300)

* Create WireMock.Net.MimePart project

* .

* REFACTOR

* ILRepack

* --

* ...

* x

* x

* .

* fix

* public class MimePartMatcher

* shared

* min

* .

* <!--<DelaySign>true</DelaySign>-->

* Update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Stef HeyenrathandCopilot authored and GitHub committed 2025-05-24 12:17:42 +02:00
1 parent c15206ecd8
commit 96eca4262a
306 files changed
+9746 -9285

No files matched your search

@@ -0,0 +1,36 @@
// Copyright © WireMock.Net
using System;
using WireMock.Models;
namespace WireMock.Extensions;
internal static class TimeSettingsExtensions
{
public static bool IsValid(this ITimeSettings? settings)
{
if (settings == null)
{
return true;
}
var now = DateTime.Now;
var start = settings.Start ?? now;
DateTime end;
if (settings.End != null)
{
end = settings.End.Value;
}
else if (settings.TTL != null)
{
end = start.AddSeconds(settings.TTL.Value);
}
else
{
end = DateTime.MaxValue;
}
return now >= start && now <= end;
}
}