mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-11-14 04:43:54 +01:00
* Fix DateTime in Response * // Set the DateTime from the Response to the current DateTime --------- Co-authored-by: Stef Heyenrath <stef.heyenrath@apg.nl>
14 lines
361 B
C#
14 lines
361 B
C#
// Copyright © WireMock.Net
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
namespace WireMock.Extensions;
|
|
|
|
internal static class HttpContextExtensions
|
|
{
|
|
internal static bool TryGet<T>(this HttpContext httpContext, [NotNullWhen(true)] out T? value)
|
|
{
|
|
return httpContext.Items.TryGetValue(nameof(T), out value);
|
|
}
|
|
} |