mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-08-12 00:43:03 +00:00
0be1bb16e3
Added SetOptions method to update client settings Added SocketConnection parameter to PeriodicQuery callback Added setting of DefaultProxyCredentials on HttpClient instance when client is not provided by DI Added support for overriding request time out per request Changed max wait time for close handshake response from 5 seconds to 1 second Fixed exception in trade tracker when there is no data in the initial snapshot
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using CryptoExchange.Net.Objects;
|
|
using System;
|
|
using System.Net.Http;
|
|
|
|
namespace CryptoExchange.Net.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Request factory interface
|
|
/// </summary>
|
|
public interface IRequestFactory
|
|
{
|
|
/// <summary>
|
|
/// Create a request for an uri
|
|
/// </summary>
|
|
/// <param name="method"></param>
|
|
/// <param name="uri"></param>
|
|
/// <param name="requestId"></param>
|
|
/// <returns></returns>
|
|
IRequest Create(HttpMethod method, Uri uri, int requestId);
|
|
|
|
/// <summary>
|
|
/// Configure the requests created by this factory
|
|
/// </summary>
|
|
/// <param name="requestTimeout">Request timeout to use</param>
|
|
/// <param name="httpClient">Optional shared http client instance</param>
|
|
/// <param name="proxy">Optional proxy to use when no http client is provided</param>
|
|
void Configure(ApiProxy? proxy, TimeSpan requestTimeout, HttpClient? httpClient = null);
|
|
|
|
/// <summary>
|
|
/// Update settings
|
|
/// </summary>
|
|
/// <param name="proxy">Proxy to use</param>
|
|
/// <param name="requestTimeout">Request timeout to use</param>
|
|
void UpdateSettings(ApiProxy? proxy, TimeSpan requestTimeout);
|
|
}
|
|
}
|