aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/Ssdp
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-05-07 14:43:50 +0200
committerBond_009 <bond.009@outlook.com>2021-05-07 14:43:50 +0200
commit06caee28b7f81fb6898a771df5a5064fdf94891d (patch)
tree0215af7ea37963b755308c437dd9638d3ea87f01 /Emby.Dlna/Ssdp
parenta3c9edde347122437e988aac9eb5dacb08f0c345 (diff)
Enable nullable reference types for Emby.Dlna
Diffstat (limited to 'Emby.Dlna/Ssdp')
-rw-r--r--Emby.Dlna/Ssdp/DeviceDiscovery.cs2
-rw-r--r--Emby.Dlna/Ssdp/SsdpExtensions.cs6
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;
}
}