19 lines
608 B
C#
19 lines
608 B
C#
|
|
using FluentResults;
|
|||
|
|
|
|||
|
|
namespace pgLabII.PgUtils.ConnectionStrings;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Codec for a specific connection string format (parse and format only for its own format).
|
|||
|
|
/// Do not implement format specifics yet; provide interface only.
|
|||
|
|
/// </summary>
|
|||
|
|
public interface IConnectionStringCodec
|
|||
|
|
{
|
|||
|
|
ConnStringFormat Format { get; }
|
|||
|
|
string FormatName { get; }
|
|||
|
|
|
|||
|
|
// Parse input in this codec's format into a descriptor.
|
|||
|
|
Result<ConnectionDescriptor> TryParse(string input);
|
|||
|
|
|
|||
|
|
// Format a descriptor into this codec's format.
|
|||
|
|
Result<string> TryFormat(ConnectionDescriptor descriptor);
|
|||
|
|
}
|