2025-08-31 06:49:37 +02:00
|
|
|
|
using FluentResults;
|
|
|
|
|
|
|
|
|
|
|
|
namespace pgLabII.PgUtils.ConnectionStrings;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// High-level service to detect, parse, format and convert between formats.
|
|
|
|
|
|
/// Implementations will compose specific codecs.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public interface IConnectionStringService
|
|
|
|
|
|
{
|
2025-10-26 17:13:31 +01:00
|
|
|
|
Result<ConnStringFormat> DetectFormat(string? input);
|
2025-08-31 06:49:37 +02:00
|
|
|
|
|
|
|
|
|
|
Result<ConnectionDescriptor> ParseToDescriptor(string input);
|
|
|
|
|
|
|
|
|
|
|
|
Result<string> FormatFromDescriptor(ConnectionDescriptor descriptor, ConnStringFormat targetFormat);
|
|
|
|
|
|
|
|
|
|
|
|
Result<string> Convert(string input, ConnStringFormat targetFormat);
|
2025-10-26 17:13:31 +01:00
|
|
|
|
}
|