We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 937c9cc commit a88d7c7Copy full SHA for a88d7c7
Src/FastData.Generator/Framework/Definitions/StringTypeDef.cs
@@ -8,11 +8,21 @@ public class StringTypeDef : ITypeDef<string>
8
public StringTypeDef(string name, Func<string, string>? print = null)
9
{
10
Name = name;
11
- Print = print ?? (static x => $"\"{x}\"");
+
12
+ if (print != null)
13
+ {
14
+ Print = print;
15
+ PrintObj = x => print(x.ToString());
16
+ }
17
+ else
18
19
+ Print = static x => $"\"{x}\"";
20
+ PrintObj = static x => $"\"{x}\"";
21
22
}
23
24
public DataType DataType => DataType.String;
25
public string Name { get; }
- public Func<object, string> PrintObj => x => $"\"{x}\"";
26
+ public Func<object, string> PrintObj { get; }
27
public Func<string, string> Print { get; }
28
0 commit comments