mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-21 08:15:28 +03:00
Use null propagation
This commit is contained in:
@@ -227,13 +227,10 @@ namespace Rssdp.Infrastructure
|
||||
}
|
||||
|
||||
var handlers = this.DeviceAvailable;
|
||||
if (handlers is not null)
|
||||
handlers?.Invoke(this, new DeviceAvailableEventArgs(device, isNewDevice)
|
||||
{
|
||||
handlers(this, new DeviceAvailableEventArgs(device, isNewDevice)
|
||||
{
|
||||
RemoteIPAddress = IPAddress
|
||||
});
|
||||
}
|
||||
RemoteIPAddress = IPAddress
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -250,10 +247,7 @@ namespace Rssdp.Infrastructure
|
||||
}
|
||||
|
||||
var handlers = this.DeviceUnavailable;
|
||||
if (handlers is not null)
|
||||
{
|
||||
handlers(this, new DeviceUnavailableEventArgs(device, expired));
|
||||
}
|
||||
handlers?.Invoke(this, new DeviceUnavailableEventArgs(device, expired));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user