Refactor Common

This commit is contained in:
2dust
2024-10-14 10:57:40 +08:00
parent 6b99b7eec5
commit 019c69ecff
11 changed files with 49 additions and 75 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ namespace ServiceLib.Common
/// <returns></returns>
public static string Serialize(object? obj, bool indented = true)
{
string result = string.Empty;
var result = string.Empty;
try
{
if (obj == null)
@@ -112,7 +112,7 @@ namespace ServiceLib.Common
}
try
{
using FileStream file = File.Create(filePath);
using var file = File.Create(filePath);
var options = new JsonSerializerOptions
{