Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 486615e

Browse files
committed
Add Print() ext methods on common int and long values
1 parent 41db082 commit 486615e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/ServiceStack.Text.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{F7FB50ED
1313
..\build\build.tasks = ..\build\build.tasks
1414
..\build\copy-pcl.bat = ..\build\copy-pcl.bat
1515
..\build\copy.bat = ..\build\copy.bat
16+
..\README.md = ..\README.md
1617
..\NuGet\ServiceStack.Text\servicestack.text.nuspec = ..\NuGet\ServiceStack.Text\servicestack.text.nuspec
1718
..\NuGet.Signed\ServiceStack.Text.Signed\servicestack.text.signed.nuspec = ..\NuGet.Signed\ServiceStack.Text.Signed\servicestack.text.signed.nuspec
1819
EndProjectSection

src/ServiceStack.Text/TypeSerializer.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,17 @@ public static void Print(this string text, params object[] args)
287287
PclExport.Instance.WriteLine(text);
288288
}
289289

290-
public static string SerializeAndFormat<T>(this T instance)
290+
public static void Print(this int intValue)
291+
{
292+
PclExport.Instance.WriteLine(intValue.ToString(CultureInfo.InvariantCulture));
293+
}
294+
295+
public static void Print(this long longValue)
296+
{
297+
PclExport.Instance.WriteLine(longValue.ToString(CultureInfo.InvariantCulture));
298+
}
299+
300+
public static string SerializeAndFormat<T>(this T instance)
291301
{
292302
var fn = instance as Delegate;
293303
if (fn != null)

0 commit comments

Comments
 (0)