Server configuration list in DataGrid.

Sorting already works out of the box.
This commit is contained in:
eelke 2025-10-26 17:13:31 +01:00
parent 26259543b3
commit 4b8a346cfb
9 changed files with 87 additions and 75 deletions

View file

@ -23,7 +23,7 @@ public sealed class ConnectionStringService : IConnectionStringService
public static ConnectionStringService CreateDefault()
=> new(new IConnectionStringCodec[] { new LibpqCodec(), new NpgsqlCodec(), new UrlCodec(), new JdbcCodec() });
public Result<ConnStringFormat> DetectFormat(string input)
public Result<ConnStringFormat> DetectFormat(string? input)
{
if (string.IsNullOrWhiteSpace(input))
return Result.Fail<ConnStringFormat>("Empty input");

View file

@ -8,11 +8,11 @@ namespace pgLabII.PgUtils.ConnectionStrings;
/// </summary>
public interface IConnectionStringService
{
Result<ConnStringFormat> DetectFormat(string input);
Result<ConnStringFormat> DetectFormat(string? input);
Result<ConnectionDescriptor> ParseToDescriptor(string input);
Result<string> FormatFromDescriptor(ConnectionDescriptor descriptor, ConnStringFormat targetFormat);
Result<string> Convert(string input, ConnStringFormat targetFormat);
}
}