mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-24 07:30:57 +01:00
ReSharper conform to 'var' settings
This commit is contained in:
parent
a36658f6f0
commit
65bd052f3e
199 changed files with 1063 additions and 1063 deletions
|
|
@ -82,7 +82,7 @@ namespace Emby.Server.Implementations.HttpClientManager
|
|||
/// <param name="host">The host.</param>
|
||||
/// <param name="enableHttpCompression">if set to <c>true</c> [enable HTTP compression].</param>
|
||||
/// <returns>HttpClient.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">host</exception>
|
||||
/// <exception cref="ArgumentNullException">host</exception>
|
||||
private HttpClientInfo GetHttpClient(string host, bool enableHttpCompression)
|
||||
{
|
||||
if (string.IsNullOrEmpty(host))
|
||||
|
|
@ -125,7 +125,7 @@ namespace Emby.Server.Implementations.HttpClientManager
|
|||
{
|
||||
string url = options.Url;
|
||||
|
||||
Uri uriAddress = new Uri(url);
|
||||
var uriAddress = new Uri(url);
|
||||
string userInfo = uriAddress.UserInfo;
|
||||
if (!string.IsNullOrWhiteSpace(userInfo))
|
||||
{
|
||||
|
|
@ -133,7 +133,7 @@ namespace Emby.Server.Implementations.HttpClientManager
|
|||
url = url.Replace(userInfo + "@", string.Empty);
|
||||
}
|
||||
|
||||
WebRequest request = CreateWebRequest(url);
|
||||
var request = CreateWebRequest(url);
|
||||
|
||||
if (request is HttpWebRequest httpWebRequest)
|
||||
{
|
||||
|
|
@ -188,7 +188,7 @@ namespace Emby.Server.Implementations.HttpClientManager
|
|||
private static CredentialCache GetCredential(string url, string username, string password)
|
||||
{
|
||||
//ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
|
||||
CredentialCache credentialCache = new CredentialCache();
|
||||
var credentialCache = new CredentialCache();
|
||||
credentialCache.Add(new Uri(url), "Basic", new NetworkCredential(username, password));
|
||||
return credentialCache;
|
||||
}
|
||||
|
|
@ -807,7 +807,7 @@ namespace Emby.Server.Implementations.HttpClientManager
|
|||
{
|
||||
var taskCompletion = new TaskCompletionSource<WebResponse>();
|
||||
|
||||
Task<WebResponse> asyncTask = Task.Factory.FromAsync<WebResponse>(request.BeginGetResponse, request.EndGetResponse, null);
|
||||
var asyncTask = Task.Factory.FromAsync(request.BeginGetResponse, request.EndGetResponse, null);
|
||||
|
||||
ThreadPool.RegisterWaitForSingleObject((asyncTask as IAsyncResult).AsyncWaitHandle, TimeoutCallback, request, timeout, true);
|
||||
var callback = new TaskCallback { taskCompletion = taskCompletion };
|
||||
|
|
@ -823,7 +823,7 @@ namespace Emby.Server.Implementations.HttpClientManager
|
|||
{
|
||||
if (timedOut && state != null)
|
||||
{
|
||||
WebRequest request = (WebRequest)state;
|
||||
var request = (WebRequest)state;
|
||||
request.Abort();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue