mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-28 11:44:48 +03:00
Inline out variable declaration
This commit is contained in:
@@ -244,7 +244,6 @@ namespace Rssdp.Infrastructure
|
||||
// Wait on random interval up to MX, as per SSDP spec.
|
||||
// Also, as per UPnP 1.1/SSDP spec ignore missing/bank MX header. If over 120, assume random value between 0 and 120.
|
||||
// Using 16 as minimum as that's often the minimum system clock frequency anyway.
|
||||
int maxWaitInterval = 0;
|
||||
if (String.IsNullOrEmpty(mx))
|
||||
{
|
||||
// Windows Explorer is poorly behaved and doesn't supply an MX header value.
|
||||
@@ -254,7 +253,7 @@ namespace Rssdp.Infrastructure
|
||||
// return;
|
||||
}
|
||||
|
||||
if (!Int32.TryParse(mx, out maxWaitInterval) || maxWaitInterval <= 0)
|
||||
if (!Int32.TryParse(mx, out var maxWaitInterval) || maxWaitInterval <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -581,8 +580,7 @@ namespace Rssdp.Infrastructure
|
||||
private string GetFirstHeaderValue(System.Net.Http.Headers.HttpRequestHeaders httpRequestHeaders, string headerName)
|
||||
{
|
||||
string retVal = null;
|
||||
IEnumerable<String> values = null;
|
||||
if (httpRequestHeaders.TryGetValues(headerName, out values) && values != null)
|
||||
if (httpRequestHeaders.TryGetValues(headerName, out var values) && values != null)
|
||||
{
|
||||
retVal = values.FirstOrDefault();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user