Adjust BuildQuery param types for .NET Framework compatibility
Use conditional compilation to set BuildQuery's tuple Value type to object for .NET Framework and object? for other targets, ensuring compatibility with nullable reference types across different .NET versions.
This commit is contained in:
@@ -33,7 +33,11 @@ namespace ReC.Client
|
||||
_http = httpClientFactory.CreateClient(ClientName);
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
private static string BuildQuery(params (string Key, object Value)[] parameters)
|
||||
#else
|
||||
private static string BuildQuery(params (string Key, object? Value)[] parameters)
|
||||
#endif
|
||||
{
|
||||
var parts = parameters
|
||||
.Where(p => p.Value != null)
|
||||
|
||||
Reference in New Issue
Block a user