diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-05-07 14:43:50 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2021-05-07 14:43:50 +0200 |
| commit | 06caee28b7f81fb6898a771df5a5064fdf94891d (patch) | |
| tree | 0215af7ea37963b755308c437dd9638d3ea87f01 /Emby.Dlna/Ssdp | |
| parent | a3c9edde347122437e988aac9eb5dacb08f0c345 (diff) | |
Enable nullable reference types for Emby.Dlna
Diffstat (limited to 'Emby.Dlna/Ssdp')
| -rw-r--r-- | Emby.Dlna/Ssdp/DeviceDiscovery.cs | 2 | ||||
| -rw-r--r-- | Emby.Dlna/Ssdp/SsdpExtensions.cs | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Emby.Dlna/Ssdp/DeviceDiscovery.cs b/Emby.Dlna/Ssdp/DeviceDiscovery.cs index d9c6a93c7e..391dda1479 100644 --- a/Emby.Dlna/Ssdp/DeviceDiscovery.cs +++ b/Emby.Dlna/Ssdp/DeviceDiscovery.cs @@ -1,3 +1,5 @@ +#nullable disable + #pragma warning disable CS1591 using System; diff --git a/Emby.Dlna/Ssdp/SsdpExtensions.cs b/Emby.Dlna/Ssdp/SsdpExtensions.cs index e7a52f168f..d00eb02b46 100644 --- a/Emby.Dlna/Ssdp/SsdpExtensions.cs +++ b/Emby.Dlna/Ssdp/SsdpExtensions.cs @@ -7,21 +7,21 @@ namespace Emby.Dlna.Ssdp { public static class SsdpExtensions { - public static string GetValue(this XElement container, XName name) + public static string? GetValue(this XElement container, XName name) { var node = container.Element(name); return node?.Value; } - public static string GetAttributeValue(this XElement container, XName name) + public static string? GetAttributeValue(this XElement container, XName name) { var node = container.Attribute(name); return node?.Value; } - public static string GetDescendantValue(this XElement container, XName name) + public static string? GetDescendantValue(this XElement container, XName name) => container.Descendants(name).FirstOrDefault()?.Value; } } |
