in src/Elastic.CommonSchema.BenchmarkDotNetExporter/FullNameProvider.cs [138:162]
private static string GetArgument(object argumentValue, Type argumentType)
{
switch (argumentValue)
{
case null:
return "null";
case IParam iparam:
return GetArgument(iparam.Value, argumentType);
case object[] array when array.Length == 1:
return GetArgument(array[0], argumentType);
case string text:
return $"\"{EscapeWhitespaces(text)}\"";
case char character:
return $"'{character}'";
case DateTime time:
return time.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK");
case Type type:
return $"typeof({GetTypeArgumentName(type)})";
}
if (argumentType != null && argumentType.IsArray)
return GetArray((IEnumerable) argumentValue);
return argumentValue.ToString();
}