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
+3 -3
View File
@@ -21,7 +21,7 @@ namespace ServiceLib.Common
.Build();
try
{
T obj = deserializer.Deserialize<T>(str);
var obj = deserializer.Deserialize<T>(str);
return obj;
}
catch (Exception ex)
@@ -36,9 +36,9 @@ namespace ServiceLib.Common
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public static string ToYaml(Object? obj)
public static string ToYaml(object? obj)
{
string result = string.Empty;
var result = string.Empty;
if (obj == null)
{
return result;