Replace MaxTimeout usage with Timeout, update Timeout to be a TimeSpan type (#19875)

This commit is contained in:
Alec Petersen
2024-11-09 01:07:13 -05:00
committed by GitHub
parent d9229c7b9f
commit bbccd2827f
46 changed files with 88 additions and 88 deletions

View File

@@ -455,7 +455,7 @@ namespace Org.OpenAPITools.Client
var clientOptions = new RestClientOptions(baseUrl)
{
ClientCertificates = configuration.ClientCertificates,
MaxTimeout = configuration.Timeout,
Timeout = configuration.Timeout,
Proxy = configuration.Proxy,
UserAgent = configuration.UserAgent,
UseDefaultCredentials = configuration.UseDefaultCredentials,

View File

@@ -137,7 +137,7 @@ namespace Org.OpenAPITools.Client
};
// Setting Timeout has side effects (forces ApiClient creation).
Timeout = 100000;
Timeout = TimeSpan.FromSeconds(100);
}
/// <summary>
@@ -221,9 +221,9 @@ namespace Org.OpenAPITools.Client
public virtual IDictionary<string, string> DefaultHeaders { get; set; }
/// <summary>
/// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds.
/// Gets or sets the HTTP timeout of ApiClient. Defaults to 100 seconds.
/// </summary>
public virtual int Timeout { get; set; }
public virtual TimeSpan Timeout { get; set; }
/// <summary>
/// Gets or sets the proxy

View File

@@ -72,10 +72,10 @@ namespace Org.OpenAPITools.Client
string TempFolderPath { get; }
/// <summary>
/// Gets the HTTP connection timeout (in milliseconds)
/// Gets the HTTP connection timeout.
/// </summary>
/// <value>HTTP connection timeout.</value>
int Timeout { get; }
TimeSpan Timeout { get; }
/// <summary>
/// Gets the proxy.