Add ReCClientOptions for configurable logging behavior

Introduce the `ReCClientOptions` class in the new `ReC.Client`
namespace. This class includes the `LogSuccessfulRequests`
property, which allows users to enable or disable logging for
successful API requests via the injected `ILogger`. Failed
requests are unaffected and will always throw `ReCApiException`.
The property defaults to `true`. XML documentation is included
to describe the class and its behavior.
This commit is contained in:
2026-05-19 19:19:32 +02:00
parent 20766091a9
commit f96ad1ac7e

View File

@@ -0,0 +1,16 @@
namespace ReC.Client
{
/// <summary>
/// Options that control the behavior of the <see cref="ReCClient"/>.
/// </summary>
public class ReCClientOptions
{
/// <summary>
/// Gets or sets a value indicating whether successful API requests should be
/// logged through the injected <see cref="Microsoft.Extensions.Logging.ILogger"/>.
/// Failed requests always throw <see cref="ReCApiException"/> regardless of this setting.
/// Defaults to <see langword="true"/>.
/// </summary>
public bool LogSuccessfulRequests { get; set; } = true;
}
}