Bond-009 пре 5 година
родитељ
комит
a6f883345f
2 измењених фајлова са 4 додато и 12 уклоњено
  1. 2 6
      Emby.Dlna/Api/DlnaServerService.cs
  2. 2 6
      MediaBrowser.Api/BaseApiService.cs

+ 2 - 6
Emby.Dlna/Api/DlnaServerService.cs

@@ -216,14 +216,10 @@ namespace Emby.Dlna.Api
         protected internal ReadOnlySpan<char> GetPathValue(int index)
         {
             static void ThrowIndexOutOfRangeException()
-            {
-                throw new IndexOutOfRangeException("Path doesn't contain enough segments.");
-            }
+                => throw new IndexOutOfRangeException("Path doesn't contain enough segments.");
 
             static void ThrowInvalidDataException()
-            {
-                throw new InvalidDataException("Path doesn't start with the base url.");
-            }
+                => throw new InvalidDataException("Path doesn't start with the base url.");
 
             ReadOnlySpan<char> path = Request.PathInfo;
 

+ 2 - 6
MediaBrowser.Api/BaseApiService.cs

@@ -317,14 +317,10 @@ namespace MediaBrowser.Api
         protected internal ReadOnlySpan<char> GetPathValue(int index)
         {
             static void ThrowIndexOutOfRangeException()
-            {
-                throw new IndexOutOfRangeException("Path doesn't contain enough segments.");
-            }
+                => throw new IndexOutOfRangeException("Path doesn't contain enough segments.");
 
             static void ThrowInvalidDataException()
-            {
-                throw new InvalidDataException("Path doesn't start with the base url.");
-            }
+                => throw new InvalidDataException("Path doesn't start with the base url.");
 
             ReadOnlySpan<char> path = Request.PathInfo;