mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
ReSharper format: conform inline 'out' parameters.
This commit is contained in:
@@ -108,11 +108,9 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
|
||||
var info = e.Argument;
|
||||
|
||||
string usn;
|
||||
if (!info.Headers.TryGetValue("USN", out usn)) usn = string.Empty;
|
||||
if (!info.Headers.TryGetValue("USN", out var usn)) usn = string.Empty;
|
||||
|
||||
string nt;
|
||||
if (!info.Headers.TryGetValue("NT", out nt)) nt = string.Empty;
|
||||
if (!info.Headers.TryGetValue("NT", out var nt)) nt = string.Empty;
|
||||
|
||||
// Filter device type
|
||||
if (usn.IndexOf("WANIPConnection:", StringComparison.OrdinalIgnoreCase) == -1 &&
|
||||
@@ -141,8 +139,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
|
||||
_logger.LogDebug("Found NAT device: " + identifier);
|
||||
|
||||
IPAddress address;
|
||||
if (IPAddress.TryParse(info.Location.Host, out address))
|
||||
if (IPAddress.TryParse(info.Location.Host, out var address))
|
||||
{
|
||||
// The Handle method doesn't need the port
|
||||
var endpoint = new IPEndPoint(address, info.Location.Port);
|
||||
@@ -153,8 +150,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
{
|
||||
var localAddressString = await _appHost.GetLocalApiUrl(CancellationToken.None).ConfigureAwait(false);
|
||||
|
||||
Uri uri;
|
||||
if (Uri.TryCreate(localAddressString, UriKind.Absolute, out uri))
|
||||
if (Uri.TryCreate(localAddressString, UriKind.Absolute, out var uri))
|
||||
{
|
||||
localAddressString = uri.Host;
|
||||
|
||||
|
||||
@@ -89,8 +89,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
|
||||
var progress = e.Argument.Item2;
|
||||
|
||||
DateTime lastMessageSendTime;
|
||||
if (_lastProgressMessageTimes.TryGetValue(item.Id, out lastMessageSendTime))
|
||||
if (_lastProgressMessageTimes.TryGetValue(item.Id, out var lastMessageSendTime))
|
||||
{
|
||||
if (progress > 0 && progress < 100 && (DateTime.UtcNow - lastMessageSendTime).TotalMilliseconds < 1000)
|
||||
{
|
||||
|
||||
@@ -62,9 +62,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
UpdateTimer.Change(UpdateDuration, Timeout.Infinite);
|
||||
}
|
||||
|
||||
List<BaseItem> keys;
|
||||
|
||||
if (!_changedItems.TryGetValue(e.UserId, out keys))
|
||||
if (!_changedItems.TryGetValue(e.UserId, out var keys))
|
||||
{
|
||||
keys = new List<BaseItem>();
|
||||
_changedItems[e.UserId] = keys;
|
||||
|
||||
Reference in New Issue
Block a user