aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Services/ServiceExec.cs
diff options
context:
space:
mode:
authorBond_009 <Bond.009@outlook.com>2020-07-22 13:34:51 +0200
committerBond_009 <Bond.009@outlook.com>2020-07-22 13:39:24 +0200
commitfebb6bced6d2eb0941ed30205558ff8cf045720b (patch)
tree829259605bb49dc01df569fee6e2919e51c47ecf /Emby.Server.Implementations/Services/ServiceExec.cs
parent0750357916b600a4b4c27bc4babd2adcc6390473 (diff)
Review usage of string.Substring (part 1)
Reduced allocations by replacing string.Substring with ReadOnlySpan<char>.Slice
Diffstat (limited to 'Emby.Server.Implementations/Services/ServiceExec.cs')
-rw-r--r--Emby.Server.Implementations/Services/ServiceExec.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Services/ServiceExec.cs b/Emby.Server.Implementations/Services/ServiceExec.cs
index cbc4b754d..947a5cbf8 100644
--- a/Emby.Server.Implementations/Services/ServiceExec.cs
+++ b/Emby.Server.Implementations/Services/ServiceExec.cs
@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
@@ -105,7 +106,12 @@ namespace Emby.Server.Implementations.Services
}
var expectedMethodName = actionName.Substring(0, 1) + actionName.Substring(1).ToLowerInvariant();
- throw new NotImplementedException(string.Format("Could not find method named {1}({0}) or Any({0}) on Service {2}", requestDto.GetType().GetMethodName(), expectedMethodName, serviceType.GetMethodName()));
+ throw new NotImplementedException(
+ string.Format(
+ CultureInfo.InvariantCulture,
+ "Could not find method named {1}({0}) or Any({0}) on Service {2}",
+ requestDto.GetType().GetMethodName(),
+ expectedMethodName, serviceType.GetMethodName()));
}
private static async Task<object> GetTaskResult(Task task)