diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-10-17 14:31:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-17 14:31:35 +0200 |
| commit | 84bbf757fa5fdf9fef45d9a61e686941e6901ba0 (patch) | |
| tree | 8f02206fad8df92ffd7a5141690e0c960c9615d5 /RSSDP/SsdpDeviceLocator.cs | |
| parent | 59ac5481288bb75b5768d1286038b5c2d3844c78 (diff) | |
| parent | 38d962242ad0b4d3cf10b175836bf1e5e9b60d39 (diff) | |
Merge pull request #10366 from goremykin/fix-resharper-warnings
Diffstat (limited to 'RSSDP/SsdpDeviceLocator.cs')
| -rw-r--r-- | RSSDP/SsdpDeviceLocator.cs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/RSSDP/SsdpDeviceLocator.cs b/RSSDP/SsdpDeviceLocator.cs index 82b09c4b4..d6fad4b9d 100644 --- a/RSSDP/SsdpDeviceLocator.cs +++ b/RSSDP/SsdpDeviceLocator.cs @@ -227,13 +227,10 @@ namespace Rssdp.Infrastructure } var handlers = 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 = DeviceUnavailable; - if (handlers is not null) - { - handlers(this, new DeviceUnavailableEventArgs(device, expired)); - } + handlers?.Invoke(this, new DeviceUnavailableEventArgs(device, expired)); } /// <summary> |
