We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c0c33c commit dd0572aCopy full SHA for dd0572a
src/Elastic.Clients.Elasticsearch/_Shared/Core/Infer/Id/IdResolver.cs
@@ -4,6 +4,7 @@
4
5
using System;
6
using System.Collections.Concurrent;
7
+using System.Globalization;
8
using System.Reflection;
9
10
#if ELASTICSEARCH_SERVERLESS
@@ -71,7 +72,7 @@ public string Resolve(Type type, object @object)
71
72
cachedLookup = o =>
73
{
74
var v = func(o);
- return v?.ToString();
75
+ return (v is IFormattable f) ? f.ToString(null, CultureInfo.InvariantCulture) : v?.ToString();
76
};
77
if (preferLocal)
78
_localIdDelegates.TryAdd(type, cachedLookup);
0 commit comments