Skip to content

IQueryParameterRegistry

Namespace: Signal.Bot

Full Name: Signal.Bot.IQueryParameterRegistry

Summary

Defines a registry for managing query parameters in HTTP requests, supporting single values and collections.

Methods

AddAndGet``1

csharp
AddAndGet``1(valueName, value, valueFactory)

Adds a query parameter and returns the value for method chaining.

Parameters:

  • valueName - The name of the query parameter (e.g., "limit", "offset").
  • value - The value to add for this parameter.
  • valueFactory - Optional factory function to convert the value to a string representation. If null, uses ToString().

Returns: The original value that was added, enabling fluent syntax.

Add``1

csharp
Add``1(valueName, value, valueFactory)

Adds a single query parameter to the registry.

Parameters:

  • valueName - The name of the query parameter (e.g., "limit", "offset").
  • value - The value to add for this parameter.
  • valueFactory - Optional factory function to convert the value to a string representation. If null, uses ToString().

AddRange``1

csharp
AddRange``1(valueName, values, valueFactory)

Adds multiple values for a single query parameter, typically for array-style parameters.

Parameters:

  • valueName - The name of the query parameter (e.g., "numbers", "recipients").
  • values - The collection of values to add for this parameter.
  • valueFactory - Optional factory function to convert each value to a string representation. If null, uses ToString().