mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 22:38:30 +01:00
Use static lambdas
This commit is contained in:
@@ -301,7 +301,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||
{
|
||||
return _configurations.GetOrAdd(
|
||||
key,
|
||||
(k, configurationManager) =>
|
||||
static (k, configurationManager) =>
|
||||
{
|
||||
var file = configurationManager.GetConfigurationFile(k);
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ namespace Emby.Server.Implementations.Localization
|
||||
|
||||
return _dictionaries.GetOrAdd(
|
||||
culture,
|
||||
(key, localizationManager) => localizationManager.GetDictionary(Prefix, key, DefaultCulture + ".json").GetAwaiter().GetResult(),
|
||||
static (key, localizationManager) => localizationManager.GetDictionary(Prefix, key, DefaultCulture + ".json").GetAwaiter().GetResult(),
|
||||
this);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.Serialization
|
||||
private static XmlSerializer GetSerializer(Type type)
|
||||
=> _serializers.GetOrAdd(
|
||||
type.FullName ?? throw new ArgumentException($"Invalid type {type}."),
|
||||
(_, t) => new XmlSerializer(t),
|
||||
static (_, t) => new XmlSerializer(t),
|
||||
type);
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user