Got at least one data fetching method working; turns out, we can't use a patched LogicStack to get the data

This commit is contained in:
2026-01-14 22:11:11 +01:00
parent 40a8431464
commit 3f7122d30a
350 changed files with 41444 additions and 119 deletions

View File

@@ -0,0 +1,27 @@
using System;
namespace EmbedIO
{
/// <summary>
/// Provides extension methods for classes derived from <see cref="WebServerOptionsBase"/>.
/// </summary>
public static class WebServerOptionsBaseExtensions
{
/// <summary>
/// Adds a URL prefix.
/// </summary>
/// <typeparam name="TOptions">The type of the object on which this method is called.</typeparam>
/// <param name="this">The object on which this method is called.</param>
/// <param name="value">If <see langword="true"/>, enable support for compressed request bodies.</param>
/// <returns><paramref name="this"/> with its <see cref="WebServerOptionsBase.SupportCompressedRequests">SupportCompressedRequests</see>
/// property set to <paramref name="value"/>.</returns>
/// <exception cref="NullReferenceException"><paramref name="this"/> is <see langword="null"/>.</exception>
/// <exception cref="InvalidOperationException">The configuration of <paramref name="this"/> is locked.</exception>
public static TOptions WithSupportCompressedRequests<TOptions>(this TOptions @this, bool value)
where TOptions : WebServerOptionsBase
{
@this.SupportCompressedRequests = value;
return @this;
}
}
}