Replace all Utils.ToInt(variable) with variable.ToInt()

This commit is contained in:
2dust
2025-03-05 20:26:26 +08:00
parent 71cc6d7a88
commit 764014e49a
9 changed files with 29 additions and 34 deletions

View File

@@ -76,7 +76,7 @@ namespace ServiceLib.Handler.Fmt
item.Security = details.Groups["method"].Value;
item.Id = details.Groups["password"].Value;
item.Address = details.Groups["hostname"].Value;
item.Port = Utils.ToInt(details.Groups["port"].Value);
item.Port = details.Groups["port"].Value.ToInt();
return item;
}
@@ -162,7 +162,7 @@ namespace ServiceLib.Handler.Fmt
Security = it.method,
Id = it.password,
Address = it.server,
Port = Utils.ToInt(it.server_port)
Port = it.server_port.ToInt()
};
lst.Add(ssItem);
}

View File

@@ -77,7 +77,7 @@ namespace ServiceLib.Handler.Fmt
return null;
}
item.Address = arr1[1][..indexPort];
item.Port = Utils.ToInt(arr1[1][(indexPort + 1)..]);
item.Port = (arr1[1][(indexPort + 1)..]).ToInt();
item.Security = arr21.First();
item.Id = arr21[1];